1 error[E0507]: cannot move out of `*__next` which is behind a `&` reference
2 --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:10
4 LL | for &a in x.iter() { //~ ERROR cannot move out
7 | |cannot move out of `*__next` which is behind a `&` reference
8 | |`__next` is a `&` reference, so the data it refers to cannot be moved
9 | help: consider changing this to be a mutable reference: `&mut a`
11 error[E0507]: cannot move out of borrowed content
12 --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:15
14 LL | for &a in x.iter() { //~ ERROR cannot move out
15 | -- ^^^^^^^^ cannot move out of borrowed content
18 | help: consider removing the `&`: `a`
20 note: move occurs because `a` has type `&mut i32`, which does not implement the `Copy` trait
21 --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:10
23 LL | for &a in x.iter() { //~ ERROR cannot move out
26 error[E0507]: cannot move out of `*__next` which is behind a `&` reference
27 --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:28:10
29 LL | for &a in &f.a { //~ ERROR cannot move out
32 | |cannot move out of `*__next` which is behind a `&` reference
33 | |`__next` is a `&` reference, so the data it refers to cannot be moved
34 | help: consider changing this to be a mutable reference: `&mut a`
36 error[E0507]: cannot move out of borrowed content
37 --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:28:15
39 LL | for &a in &f.a { //~ ERROR cannot move out
40 | -- ^^^^ cannot move out of borrowed content
43 | help: consider removing the `&`: `a`
45 note: move occurs because `a` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
46 --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:28:10
48 LL | for &a in &f.a { //~ ERROR cannot move out
51 error[E0507]: cannot move out of `*__next` which is behind a `&` reference
52 --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:32:10
54 LL | for &a in x.iter() { //~ ERROR cannot move out
57 | |cannot move out of `*__next` which is behind a `&` reference
58 | |`__next` is a `&` reference, so the data it refers to cannot be moved
59 | help: consider changing this to be a mutable reference: `&mut a`
61 error[E0507]: cannot move out of borrowed content
62 --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:32:15
64 LL | for &a in x.iter() { //~ ERROR cannot move out
65 | -- ^^^^^^^^ cannot move out of borrowed content
68 | help: consider removing the `&`: `a`
70 note: move occurs because `a` has type `std::boxed::Box<i32>`, which does not implement the `Copy` trait
71 --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:32:10
73 LL | for &a in x.iter() { //~ ERROR cannot move out
76 error: aborting due to 6 previous errors
78 For more information about this error, try `rustc --explain E0507`.