]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/for-i-in-vec.stderr
Auto merge of #86492 - hyd-dev:no-mangle-method, r=petrochenkov
[rust.git] / src / test / ui / suggestions / for-i-in-vec.stderr
1 error[E0507]: cannot move out of `self.v` which is behind a shared reference
2   --> $DIR/for-i-in-vec.rs:11:18
3    |
4 LL |         for _ in self.v {
5    |                  ^^^^^^ move occurs because `self.v` has type `Vec<u32>`, which does not implement the `Copy` trait
6    |
7 help: consider iterating over a slice of the `Vec<u32>`'s content
8    |
9 LL |         for _ in &self.v {
10    |                  +
11
12 error[E0507]: cannot move out of `self.h` which is behind a shared reference
13   --> $DIR/for-i-in-vec.rs:13:18
14    |
15 LL |         for _ in self.h {
16    |                  ^^^^^^ move occurs because `self.h` has type `HashMap<i32, i32>`, which does not implement the `Copy` trait
17    |
18 help: consider iterating over a slice of the `HashMap<i32, i32>`'s content
19    |
20 LL |         for _ in &self.h {
21    |                  +
22
23 error[E0507]: cannot move out of a shared reference
24   --> $DIR/for-i-in-vec.rs:21:19
25    |
26 LL |     for loader in *LOADERS {
27    |                   ^^^^^^^^ move occurs because value has type `Vec<&u8>`, which does not implement the `Copy` trait
28    |
29 help: consider iterating over a slice of the `Vec<&u8>`'s content
30    |
31 LL |     for loader in &*LOADERS {
32    |                   +
33
34 error: aborting due to 3 previous errors
35
36 For more information about this error, try `rustc --explain E0507`.