]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr
Update tests for changes to cannot move errors
[rust.git] / src / test / ui / borrowck / borrowck-overloaded-index-move-from-vec.stderr
index 56246cbf770a6895404452b9b9133f5529bc7e45..57f42ede21cd0c0db21bf7ae74604adc9e7d0ccf 100644 (file)
@@ -1,11 +1,11 @@
-error[E0507]: cannot move out of indexed content
-  --> $DIR/borrowck-overloaded-index-move-from-vec.rs:30:15
+error[E0507]: cannot move out of index of `MyVec<std::boxed::Box<i32>>`
+  --> $DIR/borrowck-overloaded-index-move-from-vec.rs:20:15
    |
 LL |     let bad = v[0];
    |               ^^^^
    |               |
-   |               cannot move out of indexed content
-   |               help: consider using a reference instead: `&v[0]`
+   |               move occurs because value has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
+   |               help: consider borrowing here: `&v[0]`
 
 error: aborting due to previous error