]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-derive-clone.thirunsafeck.stderr
Sync rust-lang/portable-simd@03f6fbb21e6050da2a05b3ce8f480c020b384916
[rust.git] / src / test / ui / union / union-derive-clone.thirunsafeck.stderr
1 error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
2   --> $DIR/union-derive-clone.rs:38:15
3    |
4 LL | union U5<T> {
5    | -----------
6    | |
7    | method `clone` not found for this
8    | doesn't satisfy `U5<CloneNoCopy>: Clone`
9 ...
10 LL | struct CloneNoCopy;
11    | ------------------- doesn't satisfy `CloneNoCopy: Copy`
12 ...
13 LL |     let w = u.clone();
14    |               ^^^^^ method cannot be called on `U5<CloneNoCopy>` due to unsatisfied trait bounds
15    |
16    = note: the following trait bounds were not satisfied:
17            `CloneNoCopy: Copy`
18            which is required by `U5<CloneNoCopy>: Clone`
19 help: consider annotating `CloneNoCopy` with `#[derive(Copy)]`
20    |
21 LL | #[derive(Copy)]
22    |
23
24 error[E0277]: the trait bound `U1: Copy` is not satisfied
25   --> $DIR/union-derive-clone.rs:6:10
26    |
27 LL | #[derive(Clone)]
28    |          ^^^^^ the trait `Copy` is not implemented for `U1`
29    |
30 note: required by a bound in `AssertParamIsCopy`
31   --> $SRC_DIR/core/src/clone.rs:LL:COL
32    |
33 LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
34    |                                 ^^^^ required by this bound in `AssertParamIsCopy`
35    = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
36
37 error: aborting due to 2 previous errors
38
39 Some errors have detailed explanations: E0277, E0599.
40 For more information about an error, try `rustc --explain E0277`.