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