]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/nll/issue-52663-span-decl-captured-variable.stderr
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / nll / issue-52663-span-decl-captured-variable.stderr
index 0162c6bcbd1ecc9b17158d6f39c0826fb44a0d56..57b9dc1f0be57b42afbb5c3f962dff94a821efdc 100644 (file)
@@ -1,10 +1,10 @@
-error[E0507]: cannot move out of captured variable in an `Fn` closure
-  --> $DIR/issue-52663-span-decl-captured-variable.rs:10:26
+error[E0507]: cannot move out of `x.0`, as `x` is a captured variable in an `Fn` closure
+  --> $DIR/issue-52663-span-decl-captured-variable.rs:8:26
    |
 LL |        let x = (vec![22], vec![44]);
    |            - captured outer variable
 LL |        expect_fn(|| drop(x.0));
-   |                          ^^^ cannot move out of captured variable in an `Fn` closure
+   |                          ^^^ move occurs because `x.0` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait
 
 error: aborting due to previous error