Skip to content

Instantly share code, notes, and snippets.

@durka
Created February 6, 2016 22:56
Show Gist options
  • Save durka/9db77fd583be6dcf8406 to your computer and use it in GitHub Desktop.
Save durka/9db77fd583be6dcf8406 to your computer and use it in GitHub Desktop.
#[derive(Copy, Clone)] struct Outer([u8; 100]);
$ ../build-master/x86_64-apple-darwin/stage1/bin/rustc --crate-type=lib src/copynotclone.rs
src/copynotclone.rs:1:37: 1:47 error: the trait `core::clone::Clone` is not implemented for the type `[u8; 100]` [E0277]
src/copynotclone.rs:1 #[derive(Copy, Clone)] struct Outer([u8; 100]);
^~~~~~~~~~
src/copynotclone.rs:1:16: 1:21 note: in this expansion of #[derive_Clone] (defined in src/copynotclone.rs)
src/copynotclone.rs:1:37: 1:47 help: run `rustc --explain E0277` to see a detailed explanation
src/copynotclone.rs:1:37: 1:47 help: the following implementations were found:
src/copynotclone.rs:1:37: 1:47 help: <[T; 0] as core::clone::Clone>
src/copynotclone.rs:1:37: 1:47 help: <[T; 1] as core::clone::Clone>
src/copynotclone.rs:1:37: 1:47 help: <[T; 2] as core::clone::Clone>
src/copynotclone.rs:1:37: 1:47 help: <[T; 3] as core::clone::Clone>
src/copynotclone.rs:1:37: 1:47 help: and 29 others
src/copynotclone.rs:1:37: 1:47 note: required by `core::clone::Clone::clone`
error: aborting due to previous error
$ ../build-clone-copy/x86_64-apple-darwin/stage1/bin/rustc --crate-type=lib src/copynotclone.rs
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment