]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-4335.stderr
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / issues / issue-4335.stderr
index f1b6e475949dc8224ed122ca039392850a5d5079..ca1c0b68d2a5f295e6d933cd0144b73966a64ddb 100644 (file)
@@ -1,10 +1,10 @@
-error[E0507]: cannot move out of captured variable in an `FnMut` closure
+error[E0507]: cannot move out of `*v`, as `v` is a captured variable in an `FnMut` closure
   --> $DIR/issue-4335.rs:6:20
    |
 LL | fn f<'r, T>(v: &'r T) -> Box<dyn FnMut() -> T + 'r> {
    |             - captured outer variable
 LL |     id(Box::new(|| *v))
-   |                    ^^ cannot move out of captured variable in an `FnMut` closure
+   |                    ^^ move occurs because `*v` has type `T`, which does not implement the `Copy` trait
 
 error[E0373]: closure may outlive the current function, but it borrows `v`, which is owned by the current function
   --> $DIR/issue-4335.rs:6:17