2022-06-22 23:12:18 +00:00
|
|
|
error[E0277]: the trait bound `U1: Copy` is not satisfied
|
|
|
|
--> $DIR/union-derive-clone.rs:6:10
|
|
|
|
|
|
|
|
|
LL | #[derive(Clone)]
|
|
|
|
| ^^^^^ the trait `Copy` is not implemented for `U1`
|
|
|
|
|
|
|
|
|
note: required by a bound in `AssertParamIsCopy`
|
|
|
|
--> $SRC_DIR/core/src/clone.rs:LL:COL
|
|
|
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
help: consider annotating `U1` with `#[derive(Copy)]`
|
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + #[derive(Copy)]
|
|
|
|
LL | union U1 {
|
2022-06-22 23:12:18 +00:00
|
|
|
|
|
|
|
|
|
2020-09-26 21:20:14 +00:00
|
|
|
error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
|
2021-05-13 14:42:25 +00:00
|
|
|
--> $DIR/union-derive-clone.rs:38:15
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2018-12-19 19:58:20 +00:00
|
|
|
LL | union U5<T> {
|
2020-02-19 01:53:25 +00:00
|
|
|
| -----------
|
2022-07-01 23:47:26 +00:00
|
|
|
| |
|
|
|
|
| method `clone` not found for this union
|
2020-09-02 07:40:56 +00:00
|
|
|
| doesn't satisfy `U5<CloneNoCopy>: Clone`
|
2020-02-18 07:22:19 +00:00
|
|
|
...
|
|
|
|
LL | struct CloneNoCopy;
|
2022-02-13 15:27:59 +00:00
|
|
|
| ------------------ doesn't satisfy `CloneNoCopy: Copy`
|
2018-08-08 12:28:26 +00:00
|
|
|
...
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let w = u.clone();
|
2020-09-26 21:20:14 +00:00
|
|
|
| ^^^^^ method cannot be called on `U5<CloneNoCopy>` due to unsatisfied trait bounds
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2021-10-13 13:58:41 +00:00
|
|
|
note: trait bound `CloneNoCopy: Copy` was not satisfied
|
|
|
|
--> $DIR/union-derive-clone.rs:28:10
|
|
|
|
|
|
|
|
|
LL | #[derive(Clone, Copy)]
|
|
|
|
| ^^^^^ unsatisfied trait bound introduced in this `derive` macro
|
2022-02-12 06:43:21 +00:00
|
|
|
help: consider annotating `CloneNoCopy` with `#[derive(Clone, Copy)]`
|
2021-07-26 18:26:23 +00:00
|
|
|
|
|
2023-03-18 02:18:39 +00:00
|
|
|
LL + #[derive(Clone, Copy)]
|
|
|
|
LL | struct CloneNoCopy;
|
2021-07-26 18:26:23 +00:00
|
|
|
|
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2019-04-17 17:26:38 +00:00
|
|
|
Some errors have detailed explanations: E0277, E0599.
|
2018-08-08 12:28:26 +00:00
|
|
|
For more information about an error, try `rustc --explain E0277`.
|