2018-08-08 14:28:26 +02:00
|
|
|
error[E0277]: the trait bound `U1: std::marker::Copy` is not satisfied
|
2020-04-01 04:10:13 +03:00
|
|
|
--> $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`
|
2020-03-03 15:07:04 -08:00
|
|
|
|
|
2020-06-11 21:31:49 -05:00
|
|
|
::: $SRC_DIR/core/src/clone.rs:LL:COL
|
2020-03-03 15:07:04 -08:00
|
|
|
|
|
|
|
|
LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
|
|
|
|
| ---- required by this bound in `std::clone::AssertParamIsCopy`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2019-12-16 15:56:47 +02:00
|
|
|
= 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
|
|
|
|
2020-01-08 08:05:31 -08:00
|
|
|
error[E0599]: no method named `clone` found for union `U5<CloneNoCopy>` in the current scope
|
2020-04-01 04:10:13 +03:00
|
|
|
--> $DIR/union-derive-clone.rs:37:15
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2018-12-19 20:58:20 +01:00
|
|
|
LL | union U5<T> {
|
2020-02-18 17:53:25 -08:00
|
|
|
| -----------
|
|
|
|
| |
|
|
|
|
| method `clone` not found for this
|
|
|
|
| doesn't satisfy `U5<CloneNoCopy>: std::clone::Clone`
|
2020-02-17 23:22:19 -08:00
|
|
|
...
|
|
|
|
LL | struct CloneNoCopy;
|
2020-02-18 16:35:47 -08:00
|
|
|
| ------------------- doesn't satisfy `CloneNoCopy: std::marker::Copy`
|
2018-08-08 14:28:26 +02:00
|
|
|
...
|
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>`
|
2020-03-17 11:45:02 -04:00
|
|
|
|
|
2020-06-11 21:31:49 -05:00
|
|
|
::: $SRC_DIR/core/src/clone.rs:LL:COL
|
2020-03-17 11:45:02 -04:00
|
|
|
|
|
|
|
|
LL | fn clone(&self) -> Self;
|
|
|
|
| -----
|
|
|
|
| |
|
|
|
|
| the method is available for `std::sync::Arc<U5<CloneNoCopy>>` here
|
|
|
|
| the method is available for `std::rc::Rc<U5<CloneNoCopy>>` here
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2020-02-18 16:35:47 -08:00
|
|
|
= note: the method `clone` exists but the following trait bounds were not satisfied:
|
2020-02-21 13:39:47 -08:00
|
|
|
`CloneNoCopy: std::marker::Copy`
|
|
|
|
which is required by `U5<CloneNoCopy>: std::clone::Clone`
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2019-04-17 13:26:38 -04:00
|
|
|
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`.
|