]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/union/union-derive-clone.stderr
Do not suggest implementing traits if present in predicates
[rust.git] / src / test / ui / union / union-derive-clone.stderr
index 12b5321331a799646a4bf016f468f5d1cd5b01d1..01c8e8471aac2b2242f7904646bb3838720c65ea 100644 (file)
@@ -11,16 +11,20 @@ error[E0599]: no method named `clone` found for union `U5<CloneNoCopy>` in the c
   --> $DIR/union-derive-clone.rs:37:15
    |
 LL | union U5<T> {
-   | ----------- method `clone` not found for this
+   | -----------
+   | |
+   | method `clone` not found for this
+   | doesn't satisfy `U5<CloneNoCopy>: std::clone::Clone`
+...
+LL | struct CloneNoCopy;
+   | ------------------- doesn't satisfy `CloneNoCopy: std::marker::Copy`
 ...
 LL |     let w = u.clone();
    |               ^^^^^ method not found in `U5<CloneNoCopy>`
    |
    = note: the method `clone` exists but the following trait bounds were not satisfied:
-           `U5<CloneNoCopy> : std::clone::Clone`
-   = help: items from traits can only be used if the trait is implemented and in scope
-   = note: the following trait defines an item `clone`, perhaps you need to implement it:
-           candidate #1: `std::clone::Clone`
+           `CloneNoCopy: std::marker::Copy`
+           which is required by `U5<CloneNoCopy>: std::clone::Clone`
 
 error: aborting due to 2 previous errors