|
1 |
| -error[E0507]: cannot move out of borrowed content |
| 1 | +error[E0507]: cannot move out of a shared reference |
2 | 2 | --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:15
|
3 | 3 | |
|
4 | 4 | LL | for &a in x.iter() {
|
5 |
| - | -- ^^^^^^^^ cannot move out of borrowed content |
| 5 | + | -- ^^^^^^^^ |
6 | 6 | | ||
|
7 | 7 | | |data moved here
|
| 8 | + | |move occurs because `a` has type `&mut i32`, which does not implement the `Copy` trait |
8 | 9 | | help: consider removing the `&`: `a`
|
9 |
| - | |
10 |
| -note: move occurs because `a` has type `&mut i32`, which does not implement the `Copy` trait |
11 |
| - --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:10 |
12 |
| - | |
13 |
| -LL | for &a in x.iter() { |
14 |
| - | ^ |
15 | 10 |
|
16 |
| -error[E0507]: cannot move out of borrowed content |
| 11 | +error[E0507]: cannot move out of a shared reference |
17 | 12 | --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:15
|
18 | 13 | |
|
19 | 14 | LL | for &a in &f.a {
|
20 |
| - | -- ^^^^ cannot move out of borrowed content |
| 15 | + | -- ^^^^ |
21 | 16 | | ||
|
22 | 17 | | |data moved here
|
| 18 | + | |move occurs because `a` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait |
23 | 19 | | help: consider removing the `&`: `a`
|
24 |
| - | |
25 |
| -note: move occurs because `a` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait |
26 |
| - --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:10 |
27 |
| - | |
28 |
| -LL | for &a in &f.a { |
29 |
| - | ^ |
30 | 20 |
|
31 |
| -error[E0507]: cannot move out of borrowed content |
| 21 | +error[E0507]: cannot move out of a shared reference |
32 | 22 | --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:15
|
33 | 23 | |
|
34 | 24 | LL | for &a in x.iter() {
|
35 |
| - | -- ^^^^^^^^ cannot move out of borrowed content |
| 25 | + | -- ^^^^^^^^ |
36 | 26 | | ||
|
37 | 27 | | |data moved here
|
| 28 | + | |move occurs because `a` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait |
38 | 29 | | help: consider removing the `&`: `a`
|
39 |
| - | |
40 |
| -note: move occurs because `a` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait |
41 |
| - --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:10 |
42 |
| - | |
43 |
| -LL | for &a in x.iter() { |
44 |
| - | ^ |
45 | 30 |
|
46 | 31 | error: aborting due to 3 previous errors
|
47 | 32 |
|
|
0 commit comments