rust/src/test/ui/derives/deriving-copyclone.stderr

46 lines
1.6 KiB
Plaintext
Raw Normal View History

error[E0277]: the trait bound `C: Copy` is not satisfied
--> $DIR/deriving-copyclone.rs:31:13
2018-08-08 07:28:26 -05:00
|
LL | fn is_copy<T: Copy>(_: T) {}
2020-04-06 00:15:06 -05:00
| ---- required by this bound in `is_copy`
...
2019-03-09 06:03:44 -06:00
LL | is_copy(B { a: 1, b: C });
| ^^^^^^^^^^^^^^^^
| |
| expected an implementor of trait `Copy`
| help: consider borrowing here: `&B { a: 1, b: C }`
2018-08-08 07:28:26 -05:00
|
= note: required because of the requirements on the impl of `Copy` for `B<C>`
2018-08-08 07:28:26 -05:00
error[E0277]: the trait bound `C: Clone` is not satisfied
--> $DIR/deriving-copyclone.rs:32:14
2018-08-08 07:28:26 -05:00
|
LL | fn is_clone<T: Clone>(_: T) {}
2020-04-06 00:15:06 -05:00
| ----- required by this bound in `is_clone`
...
2019-03-09 06:03:44 -06:00
LL | is_clone(B { a: 1, b: C });
| ^^^^^^^^^^^^^^^^
| |
| expected an implementor of trait `Clone`
| help: consider borrowing here: `&B { a: 1, b: C }`
2018-08-08 07:28:26 -05:00
|
= note: required because of the requirements on the impl of `Clone` for `B<C>`
2018-08-08 07:28:26 -05:00
error[E0277]: the trait bound `D: Copy` is not satisfied
--> $DIR/deriving-copyclone.rs:35:13
2018-08-08 07:28:26 -05:00
|
LL | fn is_copy<T: Copy>(_: T) {}
2020-04-06 00:15:06 -05:00
| ---- required by this bound in `is_copy`
...
2019-03-09 06:03:44 -06:00
LL | is_copy(B { a: 1, b: D });
| ^^^^^^^^^^^^^^^^
| |
| expected an implementor of trait `Copy`
| help: consider borrowing here: `&B { a: 1, b: D }`
2018-08-08 07:28:26 -05:00
|
= note: required because of the requirements on the impl of `Copy` for `B<D>`
2018-08-08 07:28:26 -05:00
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0277`.