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

29 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0277]: the trait bound `U1: std::marker::Copy` is not satisfied
--> $DIR/union-derive-clone.rs:5:10
2018-08-08 14:28:26 +02:00
|
2019-03-09 15:03:44 +03:00
LL | #[derive(Clone)]
2018-08-08 14:28:26 +02:00
| ^^^^^ the trait `std::marker::Copy` is not implemented for `U1`
|
= note: required by `std::clone::AssertParamIsCopy`
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
2018-08-08 14:28:26 +02:00
error[E0599]: no method named `clone` found for union `U5<CloneNoCopy>` in the current scope
--> $DIR/union-derive-clone.rs:37:15
2018-08-08 14:28:26 +02:00
|
LL | union U5<T> {
2018-08-08 14:28:26 +02:00
| ----------- method `clone` not found for this
...
2019-03-09 15:03:44 +03:00
LL | let w = u.clone();
2019-09-20 10:59:29 +02:00
| ^^^^^ method not found in `U5<CloneNoCopy>`
2018-08-08 14:28:26 +02:00
|
= note: the method `clone` exists but the following trait bounds were not satisfied:
`U5<CloneNoCopy> : std::clone::Clone`
2018-08-08 14:28:26 +02:00
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `clone`, perhaps you need to implement it:
candidate #1: `std::clone::Clone`
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`.