1 error[E0277]: the trait bound `U1: Copy` is not satisfied
2 --> $DIR/union-derive-clone.rs:6:10
5 | ^^^^^ the trait `Copy` is not implemented for `U1`
7 note: required by a bound in `AssertParamIsCopy`
8 --> $SRC_DIR/core/src/clone.rs:LL:COL
10 LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
11 | ^^^^ required by this bound in `AssertParamIsCopy`
12 = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
13 help: consider annotating `U1` with `#[derive(Copy)]`
18 error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
19 --> $DIR/union-derive-clone.rs:38:15
24 | method `clone` not found for this union
25 | doesn't satisfy `U5<CloneNoCopy>: Clone`
27 LL | struct CloneNoCopy;
28 | ------------------ doesn't satisfy `CloneNoCopy: Copy`
30 LL | let w = u.clone();
31 | ^^^^^ method cannot be called on `U5<CloneNoCopy>` due to unsatisfied trait bounds
33 note: trait bound `CloneNoCopy: Copy` was not satisfied
34 --> $DIR/union-derive-clone.rs:28:10
36 LL | #[derive(Clone, Copy)]
37 | ^^^^^ unsatisfied trait bound introduced in this `derive` macro
38 = note: the following trait bounds were not satisfied:
40 which is required by `U5<CloneNoCopy>: Clone`
41 help: consider annotating `CloneNoCopy` with `#[derive(Clone, Copy)]`
43 LL | #[derive(Clone, Copy)]
46 error: aborting due to 2 previous errors
48 Some errors have detailed explanations: E0277, E0599.
49 For more information about an error, try `rustc --explain E0277`.