@@ -2,10 +2,8 @@ error[E0277]: the trait bound `C: Copy` is not satisfied
2
2
--> $DIR/deriving-copyclone.rs:31:13
3
3
|
4
4
LL | is_copy(B { a: 1, b: C });
5
- | ------- ^^^^^^^^^^^^^^^^
6
- | | |
7
- | | expected an implementor of trait `Copy`
8
- | | help: consider borrowing here: `&B { a: 1, b: C }`
5
+ | ------- ^^^^^^^^^^^^^^^^ expected an implementor of trait `Copy`
6
+ | |
9
7
| required by a bound introduced by this call
10
8
|
11
9
note: required because of the requirements on the impl of `Copy` for `B<C>`
@@ -19,15 +17,17 @@ note: required by a bound in `is_copy`
19
17
LL | fn is_copy<T: Copy>(_: T) {}
20
18
| ^^^^ required by this bound in `is_copy`
21
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
+ | +
22
24
23
25
error[E0277]: the trait bound `C: Clone` is not satisfied
24
26
--> $DIR/deriving-copyclone.rs:32:14
25
27
|
26
28
LL | is_clone(B { a: 1, b: C });
27
- | -------- ^^^^^^^^^^^^^^^^
28
- | | |
29
- | | expected an implementor of trait `Clone`
30
- | | help: consider borrowing here: `&B { a: 1, b: C }`
29
+ | -------- ^^^^^^^^^^^^^^^^ expected an implementor of trait `Clone`
30
+ | |
31
31
| required by a bound introduced by this call
32
32
|
33
33
note: required because of the requirements on the impl of `Clone` for `B<C>`
@@ -41,15 +41,17 @@ note: required by a bound in `is_clone`
41
41
LL | fn is_clone<T: Clone>(_: T) {}
42
42
| ^^^^^ required by this bound in `is_clone`
43
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
+ | +
44
48
45
49
error[E0277]: the trait bound `D: Copy` is not satisfied
46
50
--> $DIR/deriving-copyclone.rs:35:13
47
51
|
48
52
LL | is_copy(B { a: 1, b: D });
49
- | ------- ^^^^^^^^^^^^^^^^
50
- | | |
51
- | | expected an implementor of trait `Copy`
52
- | | help: consider borrowing here: `&B { a: 1, b: D }`
53
+ | ------- ^^^^^^^^^^^^^^^^ expected an implementor of trait `Copy`
54
+ | |
53
55
| required by a bound introduced by this call
54
56
|
55
57
note: required because of the requirements on the impl of `Copy` for `B<D>`
@@ -63,6 +65,10 @@ note: required by a bound in `is_copy`
63
65
LL | fn is_copy<T: Copy>(_: T) {}
64
66
| ^^^^ required by this bound in `is_copy`
65
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
+ | +
66
72
67
73
error: aborting due to 3 previous errors
68
74
0 commit comments