]> git.proxmox.com Git - rustc.git/blame - src/test/ui/union/union-derive-clone.thirunsafeck.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / union / union-derive-clone.thirunsafeck.stderr
CommitLineData
5869c6ff 1error[E0599]: the method `clone` exists for union `U5<CloneNoCopy>`, but its trait bounds were not satisfied
136023e0 2 --> $DIR/union-derive-clone.rs:38:15
b7449926 3 |
e74abb32 4LL | union U5<T> {
74b04a01
XL
5 | -----------
6 | |
7 | method `clone` not found for this
1b1a35ee 8 | doesn't satisfy `U5<CloneNoCopy>: Clone`
74b04a01
XL
9...
10LL | struct CloneNoCopy;
1b1a35ee 11 | ------------------- doesn't satisfy `CloneNoCopy: Copy`
b7449926 12...
532ac7d7 13LL | let w = u.clone();
5869c6ff 14 | ^^^^^ method cannot be called on `U5<CloneNoCopy>` due to unsatisfied trait bounds
b7449926 15 |
5869c6ff 16 = note: the following trait bounds were not satisfied:
1b1a35ee
XL
17 `CloneNoCopy: Copy`
18 which is required by `U5<CloneNoCopy>: Clone`
b7449926 19
94222f64
XL
20error[E0277]: the trait bound `U1: Copy` is not satisfied
21 --> $DIR/union-derive-clone.rs:6:10
22 |
23LL | #[derive(Clone)]
24 | ^^^^^ the trait `Copy` is not implemented for `U1`
25 |
26note: required by a bound in `AssertParamIsCopy`
27 --> $SRC_DIR/core/src/clone.rs:LL:COL
28 |
29LL | pub struct AssertParamIsCopy<T: Copy + ?Sized> {
30 | ^^^^ required by this bound in `AssertParamIsCopy`
31 = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
32
b7449926
XL
33error: aborting due to 2 previous errors
34
48663c56 35Some errors have detailed explanations: E0277, E0599.
b7449926 36For more information about an error, try `rustc --explain E0277`.