]>
Commit | Line | Data |
---|---|---|
dc9dc135 | 1 | error[E0507]: cannot move out of a shared reference |
48663c56 | 2 | --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:15 |
b7449926 | 3 | | |
532ac7d7 | 4 | LL | for &a in x.iter() { |
dc9dc135 | 5 | | -- ^^^^^^^^ |
b7449926 | 6 | | || |
48663c56 | 7 | | |data moved here |
dc9dc135 | 8 | | |move occurs because `a` has type `&mut i32`, which does not implement the `Copy` trait |
48663c56 | 9 | | help: consider removing the `&`: `a` |
b7449926 | 10 | |
dc9dc135 | 11 | error[E0507]: cannot move out of a shared reference |
48663c56 | 12 | --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:15 |
b7449926 | 13 | | |
532ac7d7 | 14 | LL | for &a in &f.a { |
dc9dc135 | 15 | | -- ^^^^ |
b7449926 | 16 | | || |
48663c56 | 17 | | |data moved here |
1b1a35ee | 18 | | |move occurs because `a` has type `Box<isize>`, which does not implement the `Copy` trait |
48663c56 | 19 | | help: consider removing the `&`: `a` |
b7449926 | 20 | |
dc9dc135 | 21 | error[E0507]: cannot move out of a shared reference |
48663c56 | 22 | --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:15 |
b7449926 | 23 | | |
532ac7d7 | 24 | LL | for &a in x.iter() { |
dc9dc135 | 25 | | -- ^^^^^^^^ |
b7449926 | 26 | | || |
48663c56 | 27 | | |data moved here |
1b1a35ee | 28 | | |move occurs because `a` has type `Box<i32>`, which does not implement the `Copy` trait |
48663c56 | 29 | | help: consider removing the `&`: `a` |
b7449926 XL |
30 | |
31 | error: aborting due to 3 previous errors | |
32 | ||
33 | For more information about this error, try `rustc --explain E0507`. |