blob: e18f457a8b6f5b440dd0174b73506fe871bdcabd [file] [log] [blame]
error[E0277]: the trait bound `U1: Copy` is not satisfied
--> $DIR/union-derive-clone.rs:3:10
|
LL | #[derive(Clone)]
| ^^^^^ the trait `Copy` is not implemented for `U1`
|
::: $SRC_DIR/core/src/clone.rs:LL:COL
|
LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
| ---- required by this bound in `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<CloneNoCopy>` in the current scope
--> $DIR/union-derive-clone.rs:35:15
|
LL | union U5<T> {
| -----------
| |
| method `clone` not found for this
| doesn't satisfy `U5<CloneNoCopy>: Clone`
...
LL | struct CloneNoCopy;
| ------------------- doesn't satisfy `CloneNoCopy: Copy`
...
LL | let w = u.clone();
| ^^^^^ method not found in `U5<CloneNoCopy>`
|
::: $SRC_DIR/core/src/clone.rs:LL:COL
|
LL | fn clone(&self) -> Self;
| -----
| |
| the method is available for `Arc<U5<CloneNoCopy>>` here
| the method is available for `Rc<U5<CloneNoCopy>>` here
|
= note: the method `clone` exists but the following trait bounds were not satisfied:
`CloneNoCopy: Copy`
which is required by `U5<CloneNoCopy>: 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`.