1 error[E0277]: the trait bound `U1: std::marker::Copy` is not satisfied
2 --> $DIR/union-derive-clone.rs:5:10
5 | ^^^^^ the trait `std::marker::Copy` is not implemented for `U1`
7 = note: required by `std::clone::AssertParamIsCopy`
8 = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
10 error[E0599]: no method named `clone` found for union `U5<CloneNoCopy>` in the current scope
11 --> $DIR/union-derive-clone.rs:37:15
16 | method `clone` not found for this
17 | doesn't satisfy `U5<CloneNoCopy>: std::clone::Clone`
19 LL | struct CloneNoCopy;
20 | ------------------- doesn't satisfy `CloneNoCopy: std::marker::Copy`
22 LL | let w = u.clone();
23 | ^^^^^ method not found in `U5<CloneNoCopy>`
25 = note: the method `clone` exists but the following trait bounds were not satisfied:
26 `CloneNoCopy: std::marker::Copy`
27 which is required by `U5<CloneNoCopy>: std::clone::Clone`
28 = help: items from traits can only be used if the trait is implemented and in scope
29 = note: the following trait defines an item `clone`, perhaps you need to implement it:
30 candidate #1: `std::clone::Clone`
32 error: aborting due to 2 previous errors
34 Some errors have detailed explanations: E0277, E0599.
35 For more information about an error, try `rustc --explain E0277`.