]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/moves/moves-based-on-type-no-recursive-stack-closure.stderr
Use structured suggestion when requiring `Copy` constraint in type param
[rust.git] / src / test / ui / moves / moves-based-on-type-no-recursive-stack-closure.stderr
index 483c364752b7b7b0c8923eb60da66d33bea1a269..ead2cceebf857293567757b1c0245c7c4fba5cec 100644 (file)
@@ -11,9 +11,9 @@ error[E0382]: borrow of moved value: `f`
   --> $DIR/moves-based-on-type-no-recursive-stack-closure.rs:32:5
    |
 LL | fn conspirator<F>(mut f: F) where F: FnMut(&mut R, bool) {
-   |                -  ----- move occurs because `f` has type `F`, which does not implement the `Copy` trait
-   |                |
-   |                consider adding a `Copy` constraint to this type argument
+   |                   -----                                 - help: consider further restricting type parameter `F`: `, F: Copy`
+   |                   |
+   |                   move occurs because `f` has type `F`, which does not implement the `Copy` trait
 LL |     let mut r = R {c: Box::new(f)};
    |                                - value moved here
 LL |     f(&mut r, false)