]> git.lizzy.rs Git - rust.git/blob - src/test/ui/union/union-derive-clone.thirunsafeck.stderr
Re-use std::sealed::Sealed in os/linux/process.
[rust.git] / src / test / ui / union / union-derive-clone.thirunsafeck.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   ::: $SRC_DIR/core/src/clone.rs:LL:COL
8    |
9 LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
10    |                                 ---- required by this bound in `AssertParamIsCopy`
11    |
12    = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
13
14 error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
15   --> $DIR/union-derive-clone.rs:38:15
16    |
17 LL | union U5<T> {
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`
25 ...
26 LL |     let w = u.clone();
27    |               ^^^^^ method cannot be called on `U5<CloneNoCopy>` due to unsatisfied trait bounds
28    |
29    = note: the following trait bounds were not satisfied:
30            `CloneNoCopy: Copy`
31            which is required by `U5<CloneNoCopy>: Clone`
32
33 error: aborting due to 2 previous errors
34
35 Some errors have detailed explanations: E0277, E0599.
36 For more information about an error, try `rustc --explain E0277`.