]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/access-mode-in-closures.nll.stderr
Update output for borrowck=migrate compare mode.
[rust.git] / src / test / ui / access-mode-in-closures.nll.stderr
index b9de60f43f703f72c82096ffa92e995bea3c211d..3366f0639caa5cadfe22e00ad1f276c29affa313 100644 (file)
@@ -13,6 +13,18 @@ note: move occurs because `v` has type `std::vec::Vec<isize>`, which does not im
 LL |         match *s { sty(v) => v } //~ ERROR cannot move out
    |                        ^
 
-error: aborting due to previous error
+error[E0507]: cannot move out of `s.0` which is behind a `&` reference
+  --> $DIR/access-mode-in-closures.rs:19:24
+   |
+LL |     let _foo = unpack(|s| {
+   |                        - help: consider changing this to be a mutable reference: `&mut sty`
+LL |         // Test that `s` is moved here.
+LL |         match *s { sty(v) => v } //~ ERROR cannot move out
+   |                        ^
+   |                        |
+   |                        cannot move out of `s.0` which is behind a `&` reference
+   |                        `s` is a `&` reference, so the data it refers to cannot be moved
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0507`.