]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr
Rollup merge of #102488 - compiler-errors:gat-compatibility, r=oli-obk
[rust.git] / src / test / ui / borrowck / borrowck-for-loop-correct-cmt-for-pattern.stderr
1 error[E0507]: cannot move out of a shared reference
2   --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:15
3    |
4 LL |     for &a in x.iter() {
5    |         --    ^^^^^^^^
6    |         ||
7    |         |data moved here
8    |         |move occurs because `a` has type `&mut i32`, which does not implement the `Copy` trait
9    |         help: consider removing the `&`: `a`
10
11 error[E0507]: cannot move out of a shared reference
12   --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:15
13    |
14 LL |     for &a in &f.a {
15    |         --    ^^^^
16    |         ||
17    |         |data moved here
18    |         |move occurs because `a` has type `Box<isize>`, which does not implement the `Copy` trait
19    |         help: consider removing the `&`: `a`
20
21 error[E0507]: cannot move out of a shared reference
22   --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:15
23    |
24 LL |     for &a in x.iter() {
25    |         --    ^^^^^^^^
26    |         ||
27    |         |data moved here
28    |         |move occurs because `a` has type `Box<i32>`, which does not implement the `Copy` trait
29    |         help: consider removing the `&`: `a`
30
31 error: aborting due to 3 previous errors
32
33 For more information about this error, try `rustc --explain E0507`.