]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-derive-clone.stderr
Rollup merge of #68888 - tspiteri:ignore-to-compile_fail, r=petrochenkov
[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    | ----------- method `clone` not found for this
15 ...
16 LL |     let w = u.clone();
17    |               ^^^^^ method not found in `U5<CloneNoCopy>`
18    |
19    = note: the method `clone` exists but the following trait bounds were not satisfied:
20            `U5<CloneNoCopy> : std::clone::Clone`
21    = help: items from traits can only be used if the trait is implemented and in scope
22    = note: the following trait defines an item `clone`, perhaps you need to implement it:
23            candidate #1: `std::clone::Clone`
24
25 error: aborting due to 2 previous errors
26
27 Some errors have detailed explanations: E0277, E0599.
28 For more information about an error, try `rustc --explain E0277`.