]> git.lizzy.rs Git - rust.git/blob - tests/ui/derives/deriving-with-repr-packed-2.stderr
83540739ee3d9391c7709548d33b90ff35b472ee
[rust.git] / tests / ui / derives / deriving-with-repr-packed-2.stderr
1 error[E0599]: the method `clone` exists for struct `Foo<NonCopy>`, but its trait bounds were not satisfied
2   --> $DIR/deriving-with-repr-packed-2.rs:20:11
3    |
4 LL | pub struct Foo<T>(T, T, T);
5    | -----------------
6    | |
7    | method `clone` not found for this struct
8    | doesn't satisfy `Foo<NonCopy>: Clone`
9 LL |
10 LL | struct NonCopy;
11    | --------------
12    | |
13    | doesn't satisfy `NonCopy: Clone`
14    | doesn't satisfy `NonCopy: Copy`
15 ...
16 LL |     _ = x.clone();
17    |           ^^^^^ method cannot be called on `Foo<NonCopy>` due to unsatisfied trait bounds
18    |
19 note: the following trait bounds were not satisfied:
20       `NonCopy: Clone`
21       `NonCopy: Copy`
22   --> $DIR/deriving-with-repr-packed-2.rs:7:16
23    |
24 LL | #[derive(Copy, Clone, Default, PartialEq, Eq)]
25    |                ^^^^^ unsatisfied trait bound introduced in this `derive` macro
26 help: consider annotating `NonCopy` with `#[derive(Clone, Copy)]`
27    |
28 LL | #[derive(Clone, Copy)]
29    |
30
31 error: aborting due to previous error
32
33 For more information about this error, try `rustc --explain E0599`.