]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/borrowck-for-loop-correct-cmt-for-pattern.stderr
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-for-loop-correct-cmt-for-pattern.stderr
CommitLineData
dc9dc135 1error[E0507]: cannot move out of a shared reference
48663c56 2 --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:12:15
b7449926 3 |
532ac7d7 4LL | 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 11error[E0507]: cannot move out of a shared reference
48663c56 12 --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:18:15
b7449926 13 |
532ac7d7 14LL | 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 21error[E0507]: cannot move out of a shared reference
48663c56 22 --> $DIR/borrowck-for-loop-correct-cmt-for-pattern.rs:22:15
b7449926 23 |
532ac7d7 24LL | 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
31error: aborting due to 3 previous errors
32
33For more information about this error, try `rustc --explain E0507`.