2020-01-21 13:11:00 -06:00
|
|
|
error[E0507]: cannot move out of `self.v` which is behind a shared reference
|
2021-07-28 12:08:39 -05:00
|
|
|
--> $DIR/for-i-in-vec.rs:11:18
|
2020-01-21 13:11:00 -06:00
|
|
|
|
|
|
|
|
LL | for _ in self.v {
|
2022-03-01 22:30:16 -06:00
|
|
|
| ^^^^^^
|
|
|
|
| |
|
|
|
|
| `self.v` moved due to this implicit call to `.into_iter()`
|
|
|
|
| move occurs because `self.v` has type `Vec<u32>`, which does not implement the `Copy` trait
|
2021-07-28 12:08:39 -05:00
|
|
|
|
|
2022-12-12 06:07:09 -06:00
|
|
|
note: `into_iter` takes ownership of the receiver `self`, which moves `self.v`
|
2022-03-01 22:30:16 -06:00
|
|
|
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
|
|
|
|
help: consider iterating over a slice of the `Vec<u32>`'s content to avoid moving into the `for` loop
|
2021-07-28 12:08:39 -05:00
|
|
|
|
|
|
|
|
LL | for _ in &self.v {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +
|
2021-07-28 12:08:39 -05:00
|
|
|
|
|
|
|
error[E0507]: cannot move out of `self.h` which is behind a shared reference
|
|
|
|
--> $DIR/for-i-in-vec.rs:13:18
|
|
|
|
|
|
|
|
|
LL | for _ in self.h {
|
2022-03-01 22:30:16 -06:00
|
|
|
| ^^^^^^
|
|
|
|
| |
|
|
|
|
| `self.h` moved due to this implicit call to `.into_iter()`
|
|
|
|
| move occurs because `self.h` has type `HashMap<i32, i32>`, which does not implement the `Copy` trait
|
2021-07-28 12:08:39 -05:00
|
|
|
|
|
2022-03-01 22:30:16 -06:00
|
|
|
help: consider iterating over a slice of the `HashMap<i32, i32>`'s content to avoid moving into the `for` loop
|
2021-07-28 12:08:39 -05:00
|
|
|
|
|
|
|
|
LL | for _ in &self.h {
|
2021-06-21 21:07:19 -05:00
|
|
|
| +
|
2020-01-21 13:11:00 -06:00
|
|
|
|
2021-08-05 08:41:08 -05:00
|
|
|
error[E0507]: cannot move out of a shared reference
|
|
|
|
--> $DIR/for-i-in-vec.rs:21:19
|
|
|
|
|
|
|
|
|
LL | for loader in *LOADERS {
|
2022-03-01 22:30:16 -06:00
|
|
|
| ^^^^^^^^
|
|
|
|
| |
|
|
|
|
| value moved due to this implicit call to `.into_iter()`
|
|
|
|
| move occurs because value has type `Vec<&u8>`, which does not implement the `Copy` trait
|
|
|
|
|
|
2022-12-12 06:07:09 -06:00
|
|
|
note: `into_iter` takes ownership of the receiver `self`, which moves value
|
2022-03-01 22:30:16 -06:00
|
|
|
--> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
|
|
|
|
help: consider iterating over a slice of the `Vec<&u8>`'s content to avoid moving into the `for` loop
|
2021-08-05 08:41:08 -05:00
|
|
|
|
|
|
|
|
LL | for loader in &*LOADERS {
|
|
|
|
| +
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2020-01-21 13:11:00 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0507`.
|