]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-40402-ref-hints/issue-40402-2.nll.stderr
Update output for borrowck=migrate compare mode.
[rust.git] / src / test / ui / issues / issue-40402-ref-hints / issue-40402-2.nll.stderr
1 error[E0507]: cannot move out of data in a `&` reference
2   --> $DIR/issue-40402-2.rs:15:10
3    |
4 LL |     let (a, b) = x[0]; //~ ERROR cannot move out of indexed content
5    |          ^
6    |          |
7    |          cannot move out of data in a `&` reference
8    |          cannot move
9
10 error[E0507]: cannot move out of data in a `&` reference
11   --> $DIR/issue-40402-2.rs:15:13
12    |
13 LL |     let (a, b) = x[0]; //~ ERROR cannot move out of indexed content
14    |             ^
15    |             |
16    |             cannot move out of data in a `&` reference
17    |             cannot move
18
19 error[E0507]: cannot move out of borrowed content
20   --> $DIR/issue-40402-2.rs:15:18
21    |
22 LL |     let (a, b) = x[0]; //~ ERROR cannot move out of indexed content
23    |          -  -    ^^^^
24    |          |  |    |
25    |          |  |    cannot move out of borrowed content
26    |          |  |    help: consider borrowing here: `&x[0]`
27    |          |  ...and here
28    |          data moved here
29    |
30 note: move occurs because these variables have types that don't implement the `Copy` trait
31   --> $DIR/issue-40402-2.rs:15:10
32    |
33 LL |     let (a, b) = x[0]; //~ ERROR cannot move out of indexed content
34    |          ^  ^
35
36 error: aborting due to 3 previous errors
37
38 For more information about this error, try `rustc --explain E0507`.