]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/unop-move-semantics.stderr
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / unop-move-semantics.stderr
index 5122d16bd9347969e23d0572ff6d62edded72beb..6aa3d0b09896b6b77444ea3e7600a7c10897e435 100644 (file)
@@ -34,17 +34,17 @@ LL |     !y;
 LL |     use_mut(n); use_imm(m);
    |             - borrow later used here
 
-error[E0507]: cannot move out of borrowed content
+error[E0507]: cannot move out of `*m` which is behind a mutable reference
   --> $DIR/unop-move-semantics.rs:24:6
    |
 LL |     !*m;
-   |      ^^ cannot move out of borrowed content
+   |      ^^ move occurs because `*m` has type `T`, which does not implement the `Copy` trait
 
-error[E0507]: cannot move out of borrowed content
+error[E0507]: cannot move out of `*n` which is behind a shared reference
   --> $DIR/unop-move-semantics.rs:26:6
    |
 LL |     !*n;
-   |      ^^ cannot move out of borrowed content
+   |      ^^ move occurs because `*n` has type `T`, which does not implement the `Copy` trait
 
 error: aborting due to 5 previous errors