]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-overloaded-index-move-from-vec.stderr
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / ui / borrowck / borrowck-overloaded-index-move-from-vec.stderr
1 error[E0507]: cannot move out of index of `MyVec<Box<i32>>`
2   --> $DIR/borrowck-overloaded-index-move-from-vec.rs:20:15
3    |
4 LL |     let bad = v[0];
5    |               ^^^^ move occurs because value has type `Box<i32>`, which does not implement the `Copy` trait
6    |
7 help: consider borrowing here
8    |
9 LL |     let bad = &v[0];
10    |               +
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0507`.