rust/src/test/ui/union/union-derive-clone.stderr

37 lines
1.3 KiB
Plaintext
Raw Normal View History

error[E0277]: the trait bound `U1: Copy` is not satisfied
--> $DIR/union-derive-clone.rs:3:10
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | #[derive(Clone)]
| ^^^^^ the trait `Copy` is not implemented for `U1`
|
2020-06-11 21:31:49 -05:00
::: $SRC_DIR/core/src/clone.rs:LL:COL
|
LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
| ---- required by this bound in `AssertParamIsCopy`
2018-08-08 14:28:26 +02:00
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
2018-08-08 14:28:26 +02:00
error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
--> $DIR/union-derive-clone.rs:35:15
2018-08-08 14:28:26 +02:00
|
LL | union U5<T> {
| -----------
| |
| method `clone` not found for this
| doesn't satisfy `U5<CloneNoCopy>: Clone`
...
LL | struct CloneNoCopy;
| ------------------- doesn't satisfy `CloneNoCopy: Copy`
2018-08-08 14:28:26 +02:00
...
2019-03-09 15:03:44 +03:00
LL | let w = u.clone();
| ^^^^^ method cannot be called on `U5<CloneNoCopy>` due to unsatisfied trait bounds
2018-08-08 14:28:26 +02:00
|
= note: the following trait bounds were not satisfied:
`CloneNoCopy: Copy`
which is required by `U5<CloneNoCopy>: Clone`
2018-08-08 14:28:26 +02:00
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0277, E0599.
2018-08-08 14:28:26 +02:00
For more information about an error, try `rustc --explain E0277`.