]>
Commit | Line | Data |
---|---|---|
72b1a166 FG |
1 | error[E0277]: the trait bound `U1: Copy` is not satisfied |
2 | --> $DIR/union-derive-clone.rs:3:10 | |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | #[derive(Clone)] |
72b1a166 FG |
5 | | ^^^^^ the trait `Copy` is not implemented for `U1` |
6 | | | |
7 | ::: $SRC_DIR/core/src/clone.rs:LL:COL | |
b7449926 | 8 | | |
72b1a166 FG |
9 | LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> { |
10 | | ---- required by this bound in `AssertParamIsCopy` | |
11 | | | |
12 | = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info) | |
b7449926 | 13 | |
46de9a89 | 14 | error[E0599]: no method named `clone` found for union `U5<CloneNoCopy>` in the current scope |
72b1a166 | 15 | --> $DIR/union-derive-clone.rs:35:15 |
b7449926 | 16 | | |
e74abb32 | 17 | LL | union U5<T> { |
72b1a166 FG |
18 | | ----------- |
19 | | | | |
20 | | method `clone` not found for this | |
21 | | doesn't satisfy `U5<CloneNoCopy>: Clone` | |
22 | ... | |
23 | LL | struct CloneNoCopy; | |
24 | | ------------------- doesn't satisfy `CloneNoCopy: Copy` | |
b7449926 | 25 | ... |
532ac7d7 | 26 | LL | let w = u.clone(); |
e74abb32 | 27 | | ^^^^^ method not found in `U5<CloneNoCopy>` |
72b1a166 FG |
28 | | |
29 | ::: $SRC_DIR/core/src/clone.rs:LL:COL | |
30 | | | |
31 | LL | fn clone(&self) -> Self; | |
32 | | ----- | |
33 | | | | |
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: | |
72b1a166 FG |
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`. |