]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-derive-clone.stderr
fdf2393656e12d94c92cebfc322299b2a1f74f35
[rust.git] / src / test / ui / union / union-derive-clone.stderr
1 error[E0277]: the trait bound `U1: std::marker::Copy` is not satisfied
2   --> $DIR/union-derive-clone.rs:5:10
3    |
4 LL | #[derive(Clone)]
5    |          ^^^^^ the trait `std::marker::Copy` is not implemented for `U1`
6    |
7    = note: required by `std::clone::AssertParamIsCopy`
8    = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
9
10 error[E0599]: no method named `clone` found for union `U5<CloneNoCopy>` in the current scope
11   --> $DIR/union-derive-clone.rs:37:15
12    |
13 LL | union U5<T> {
14    | -----------
15    | |
16    | method `clone` not found for this
17    | doesn't satisfy `U5<CloneNoCopy>: std::clone::Clone`
18 ...
19 LL | struct CloneNoCopy;
20    | ------------------- doesn't satisfy `CloneNoCopy: std::marker::Copy`
21 ...
22 LL |     let w = u.clone();
23    |               ^^^^^ method not found in `U5<CloneNoCopy>`
24    |
25    = note: the method `clone` exists but the following trait bounds were not satisfied:
26            `CloneNoCopy: std::marker::Copy`
27            which is required by `U5<CloneNoCopy>: std::clone::Clone`
28    = help: items from traits can only be used if the trait is implemented and in scope
29    = note: the following trait defines an item `clone`, perhaps you need to implement it:
30            candidate #1: `std::clone::Clone`
31
32 error: aborting due to 2 previous errors
33
34 Some errors have detailed explanations: E0277, E0599.
35 For more information about an error, try `rustc --explain E0277`.