]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0277]: the trait bound `U1: Copy` is not satisfied |
e74abb32 | 2 | --> $DIR/union-derive-clone.rs:5:10 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | #[derive(Clone)] |
1b1a35ee | 5 | | ^^^^^ the trait `Copy` is not implemented for `U1` |
ba9703b0 | 6 | | |
3dfed10e | 7 | ::: $SRC_DIR/core/src/clone.rs:LL:COL |
ba9703b0 XL |
8 | | |
9 | LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> { | |
1b1a35ee | 10 | | ---- required by this bound in `AssertParamIsCopy` |
b7449926 | 11 | | |
74b04a01 | 12 | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) |
b7449926 | 13 | |
dfeec247 | 14 | error[E0599]: no method named `clone` found for union `U5<CloneNoCopy>` in the current scope |
e74abb32 | 15 | --> $DIR/union-derive-clone.rs:37:15 |
b7449926 | 16 | | |
e74abb32 | 17 | LL | union U5<T> { |
74b04a01 XL |
18 | | ----------- |
19 | | | | |
20 | | method `clone` not found for this | |
1b1a35ee | 21 | | doesn't satisfy `U5<CloneNoCopy>: Clone` |
74b04a01 XL |
22 | ... |
23 | LL | struct CloneNoCopy; | |
1b1a35ee | 24 | | ------------------- doesn't satisfy `CloneNoCopy: Copy` |
b7449926 | 25 | ... |
532ac7d7 | 26 | LL | let w = u.clone(); |
e74abb32 | 27 | | ^^^^^ method not found in `U5<CloneNoCopy>` |
ba9703b0 | 28 | | |
3dfed10e | 29 | ::: $SRC_DIR/core/src/clone.rs:LL:COL |
ba9703b0 XL |
30 | | |
31 | LL | fn clone(&self) -> Self; | |
32 | | ----- | |
33 | | | | |
1b1a35ee XL |
34 | | the method is available for `Arc<U5<CloneNoCopy>>` here |
35 | | the method is available for `Rc<U5<CloneNoCopy>>` here | |
b7449926 XL |
36 | | |
37 | = note: the method `clone` exists but the following trait bounds were not satisfied: | |
1b1a35ee XL |
38 | `CloneNoCopy: Copy` |
39 | which is required by `U5<CloneNoCopy>: Clone` | |
b7449926 XL |
40 | |
41 | error: aborting due to 2 previous errors | |
42 | ||
48663c56 | 43 | Some errors have detailed explanations: E0277, E0599. |
b7449926 | 44 | For more information about an error, try `rustc --explain E0277`. |