2020-09-02 10:40:56 +03:00
|
|
|
error[E0277]: the trait bound `U1: Copy` is not satisfied
|
2020-10-04 22:24:14 +02:00
|
|
|
--> $DIR/union-derive-clone.rs:3:10
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | #[derive(Clone)]
|
2020-09-02 10:40:56 +03:00
|
|
|
| ^^^^^ the trait `Copy` is not implemented for `U1`
|
2020-03-03 15:07:04 -08:00
|
|
|
|
|
2020-06-11 21:31:49 -05:00
|
|
|
::: $SRC_DIR/core/src/clone.rs:LL:COL
|
2020-03-03 15:07:04 -08:00
|
|
|
|
|
|
|
|
LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
|
2020-09-02 10:40:56 +03:00
|
|
|
| ---- required by this bound in `AssertParamIsCopy`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2021-02-13 14:52:25 -05:00
|
|
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2018-08-08 14:28:26 +02:00
|
|
|
|
2020-09-26 17:20:14 -04:00
|
|
|
error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
|
2020-10-04 22:24:14 +02:00
|
|
|
--> $DIR/union-derive-clone.rs:35:15
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2018-12-19 20:58:20 +01:00
|
|
|
LL | union U5<T> {
|
2020-02-18 17:53:25 -08:00
|
|
|
| -----------
|
|
|
|
| |
|
|
|
|
| method `clone` not found for this
|
2020-09-02 10:40:56 +03:00
|
|
|
| doesn't satisfy `U5<CloneNoCopy>: Clone`
|
2020-02-17 23:22:19 -08:00
|
|
|
...
|
|
|
|
LL | struct CloneNoCopy;
|
2020-09-02 10:40:56 +03:00
|
|
|
| ------------------- doesn't satisfy `CloneNoCopy: Copy`
|
2018-08-08 14:28:26 +02:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | let w = u.clone();
|
2020-09-26 17:20:14 -04:00
|
|
|
| ^^^^^ method cannot be called on `U5<CloneNoCopy>` due to unsatisfied trait bounds
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-09-26 17:20:14 -04:00
|
|
|
= note: the following trait bounds were not satisfied:
|
2020-09-02 10:40:56 +03:00
|
|
|
`CloneNoCopy: Copy`
|
|
|
|
which is required by `U5<CloneNoCopy>: Clone`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2019-04-17 13:26:38 -04:00
|
|
|
Some errors have detailed explanations: E0277, E0599.
|
2018-08-08 14:28:26 +02:00
|
|
|
For more information about an error, try `rustc --explain E0277`.
|