]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.nll.stderr
Update output for borrowck=migrate compare mode.
[rust.git] / src / test / ui / borrowck / borrowck-for-loop-correct-cmt-for-pattern.nll.stderr
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
3    |
4 LL |     for &a in x.iter() {    //~ ERROR cannot move out
5    |         -^
6    |         ||
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`
10
11 error[E0507]: cannot move out of borrowed content
12   --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:15
13    |
14 LL |     for &a in x.iter() {    //~ ERROR cannot move out
15    |         --    ^^^^^^^^ cannot move out of borrowed content
16    |         ||
17    |         |data moved here
18    |         help: consider removing the `&`: `a`
19    |
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
22    |
23 LL |     for &a in x.iter() {    //~ ERROR cannot move out
24    |          ^
25
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
28    |
29 LL |     for &a in &f.a {  //~ ERROR cannot move out
30    |         -^
31    |         ||
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`
35
36 error[E0507]: cannot move out of borrowed content
37   --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:28:15
38    |
39 LL |     for &a in &f.a {  //~ ERROR cannot move out
40    |         --    ^^^^ cannot move out of borrowed content
41    |         ||
42    |         |data moved here
43    |         help: consider removing the `&`: `a`
44    |
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
47    |
48 LL |     for &a in &f.a {  //~ ERROR cannot move out
49    |          ^
50
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
53    |
54 LL |     for &a in x.iter() {    //~ ERROR cannot move out
55    |         -^
56    |         ||
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`
60
61 error[E0507]: cannot move out of borrowed content
62   --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:32:15
63    |
64 LL |     for &a in x.iter() {    //~ ERROR cannot move out
65    |         --    ^^^^^^^^ cannot move out of borrowed content
66    |         ||
67    |         |data moved here
68    |         help: consider removing the `&`: `a`
69    |
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
72    |
73 LL |     for &a in x.iter() {    //~ ERROR cannot move out
74    |          ^
75
76 error: aborting due to 6 previous errors
77
78 For more information about this error, try `rustc --explain E0507`.