]> git.lizzy.rs Git - rust.git/blob - src/test/ui/derives/deriving-copyclone.stderr
Auto merge of #106025 - matthiaskrgr:rollup-vz5rqah, r=matthiaskrgr
[rust.git] / src / test / ui / derives / deriving-copyclone.stderr
1 error[E0277]: the trait bound `B<C>: Copy` is not satisfied
2   --> $DIR/deriving-copyclone.rs:31:13
3    |
4 LL |     is_copy(B { a: 1, b: C });
5    |     ------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `B<C>`
6    |     |
7    |     required by a bound introduced by this call
8    |
9 note: required for `B<C>` to implement `Copy`
10   --> $DIR/deriving-copyclone.rs:9:10
11    |
12 LL | #[derive(Copy, Clone)]
13    |          ^^^^
14 note: required by a bound in `is_copy`
15   --> $DIR/deriving-copyclone.rs:18:15
16    |
17 LL | fn is_copy<T: Copy>(_: T) {}
18    |               ^^^^ required by this bound in `is_copy`
19    = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
20 help: consider borrowing here
21    |
22 LL |     is_copy(&B { a: 1, b: C });
23    |             +
24
25 error[E0277]: the trait bound `B<C>: Clone` is not satisfied
26   --> $DIR/deriving-copyclone.rs:32:14
27    |
28 LL |     is_clone(B { a: 1, b: C });
29    |     -------- ^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B<C>`
30    |     |
31    |     required by a bound introduced by this call
32    |
33 note: required for `B<C>` to implement `Clone`
34   --> $DIR/deriving-copyclone.rs:9:16
35    |
36 LL | #[derive(Copy, Clone)]
37    |                ^^^^^
38 note: required by a bound in `is_clone`
39   --> $DIR/deriving-copyclone.rs:19:16
40    |
41 LL | fn is_clone<T: Clone>(_: T) {}
42    |                ^^^^^ required by this bound in `is_clone`
43    = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
44 help: consider borrowing here
45    |
46 LL |     is_clone(&B { a: 1, b: C });
47    |              +
48
49 error[E0277]: the trait bound `B<D>: Copy` is not satisfied
50   --> $DIR/deriving-copyclone.rs:35:13
51    |
52 LL |     is_copy(B { a: 1, b: D });
53    |     ------- ^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `B<D>`
54    |     |
55    |     required by a bound introduced by this call
56    |
57 note: required for `B<D>` to implement `Copy`
58   --> $DIR/deriving-copyclone.rs:9:10
59    |
60 LL | #[derive(Copy, Clone)]
61    |          ^^^^
62 note: required by a bound in `is_copy`
63   --> $DIR/deriving-copyclone.rs:18:15
64    |
65 LL | fn is_copy<T: Copy>(_: T) {}
66    |               ^^^^ required by this bound in `is_copy`
67    = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
68 help: consider borrowing here
69    |
70 LL |     is_copy(&B { a: 1, b: D });
71    |             +
72
73 error: aborting due to 3 previous errors
74
75 For more information about this error, try `rustc --explain E0277`.