]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/dst/dst-rvalue.stderr
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / dst / dst-rvalue.stderr
index 2c92f5dcbf54747cb0ad89026b163d3940c38a83..6a51c5175588020265d8f8e3564741c7a7c43782 100644 (file)
@@ -10,19 +10,22 @@ error[E0161]: cannot move a value of type [isize]: the size of [isize] cannot be
 LL |     let _x: Box<[isize]> = box *array;
    |                                ^^^^^^
 
-error[E0507]: cannot move out of borrowed content
+error[E0507]: cannot move out of a shared reference
   --> $DIR/dst-rvalue.rs:6:28
    |
 LL |     let _x: Box<str> = box *"hello world";
-   |                            ^^^^^^^^^^^^^^ cannot move out of borrowed content
+   |                            ^^^^^^^^^^^^^^ move occurs because value has type `str`, which does not implement the `Copy` trait
 
-error[E0507]: cannot move out of borrowed content
+error[E0508]: cannot move out of type `[isize]`, a non-copy slice
   --> $DIR/dst-rvalue.rs:11:32
    |
 LL |     let _x: Box<[isize]> = box *array;
-   |                                ^^^^^^ cannot move out of borrowed content
+   |                                ^^^^^^
+   |                                |
+   |                                cannot move out of here
+   |                                move occurs because `*array` has type `[isize]`, which does not implement the `Copy` trait
 
 error: aborting due to 4 previous errors
 
-Some errors occurred: E0161, E0507.
+Some errors have detailed explanations: E0161, E0507, E0508.
 For more information about an error, try `rustc --explain E0161`.