]>
Commit | Line | Data |
---|---|---|
48663c56 | 1 | error[E0382]: borrow of moved value: `some_vec` |
0731742a | 2 | --> $DIR/tab_3.rs:7:20 |
ea8adc8c | 3 | | |
48663c56 | 4 | LL | let some_vec = vec!["hi"]; |
1b1a35ee | 5 | | -------- move occurs because `some_vec` has type `Vec<&str>`, which does not implement the `Copy` trait |
0531ce1d | 6 | LL | some_vec.into_iter(); |
f035d41b | 7 | | ----------- `some_vec` moved due to this method call |
0531ce1d | 8 | LL | { |
532ac7d7 | 9 | LL | println!("{:?}", some_vec); |
48663c56 | 10 | | ^^^^^^^^ value borrowed here after move |
f035d41b XL |
11 | | |
12 | note: this function consumes the receiver `self` by taking ownership of it, which moves `some_vec` | |
3dfed10e | 13 | --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL |
f035d41b XL |
14 | | |
15 | LL | fn into_iter(self) -> Self::IntoIter; | |
16 | | ^^^^ | |
ea8adc8c XL |
17 | |
18 | error: aborting due to previous error | |
19 | ||
0531ce1d | 20 | For more information about this error, try `rustc --explain E0382`. |