error[E0277]: the trait bound `U1: std::marker::Copy` is not satisfied --> $DIR/union-derive-clone.rs:5:10 | LL | #[derive(Clone)] | ^^^^^ the trait `std::marker::Copy` is not implemented for `U1` | ::: $SRC_DIR/core/src/clone.rs:LL:COL | LL | pub struct AssertParamIsCopy { | ---- required by this bound in `std::clone::AssertParamIsCopy` | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: no method named `clone` found for union `U5` in the current scope --> $DIR/union-derive-clone.rs:37:15 | LL | union U5 { | ----------- | | | method `clone` not found for this | doesn't satisfy `U5: std::clone::Clone` ... LL | struct CloneNoCopy; | ------------------- doesn't satisfy `CloneNoCopy: std::marker::Copy` ... LL | let w = u.clone(); | ^^^^^ method not found in `U5` | ::: $SRC_DIR/core/src/clone.rs:LL:COL | LL | fn clone(&self) -> Self; | ----- | | | the method is available for `std::sync::Arc>` here | the method is available for `std::rc::Rc>` here | = note: the method `clone` exists but the following trait bounds were not satisfied: `CloneNoCopy: std::marker::Copy` which is required by `U5: std::clone::Clone` error: aborting due to 2 previous errors Some errors have detailed explanations: E0277, E0599. For more information about an error, try `rustc --explain E0277`.