2018-08-08 12:28:26 +00:00
|
|
|
error[E0277]: the trait bound `U1: std::marker::Copy` is not satisfied
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/union-derive-clone.rs:3:10
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | #[derive(Clone)]
|
2018-08-08 12:28:26 +00:00
|
|
|
| ^^^^^ the trait `std::marker::Copy` is not implemented for `U1`
|
|
|
|
|
|
|
|
|
= note: required by `std::clone::AssertParamIsCopy`
|
|
|
|
|
|
|
|
error[E0599]: no method named `clone` found for type `U4<CloneNoCopy>` in the current scope
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/union-derive-clone.rs:30:15
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
|
LL | union U4<T> {
|
|
|
|
| ----------- method `clone` not found for this
|
|
|
|
...
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let w = u.clone();
|
2018-08-08 12:28:26 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
= note: the method `clone` exists but the following trait bounds were not satisfied:
|
|
|
|
`U4<CloneNoCopy> : std::clone::Clone`
|
|
|
|
= help: items from traits can only be used if the trait is implemented and in scope
|
|
|
|
= note: the following trait defines an item `clone`, perhaps you need to implement it:
|
|
|
|
candidate #1: `std::clone::Clone`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
Some errors occurred: E0277, E0599.
|
|
|
|
For more information about an error, try `rustc --explain E0277`.
|