]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/moves/moves-based-on-type-move-out-of-closure-env-issue-1965.stderr
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / moves / moves-based-on-type-move-out-of-closure-env-issue-1965.stderr
index 0568a2e94a71d2b4aa8bfb6531bfeb9174de1b9a..fafd377c12b9da5a92560be356e4e677a3103296 100644 (file)
@@ -1,10 +1,10 @@
-error[E0507]: cannot move out of captured variable in an `Fn` closure
+error[E0507]: cannot move out of `i`, a captured variable in an `Fn` closure
   --> $DIR/moves-based-on-type-move-out-of-closure-env-issue-1965.rs:11:28
    |
 LL |     let i = box 3;
    |         - captured outer variable
 LL |     let _f = to_fn(|| test(i));
-   |                            ^ cannot move out of captured variable in an `Fn` closure
+   |                            ^ move occurs because `i` has type `std::boxed::Box<usize>`, which does not implement the `Copy` trait
 
 error: aborting due to previous error