1 error[E0505]: cannot move out of `a` because it is borrowed
2 --> $DIR/borrow-for-loop-head.rs:4:18
5 | -- borrow of `a` occurs here
7 | ^ move out of `a` occurs here
9 error[E0382]: use of moved value: `a`
10 --> $DIR/borrow-for-loop-head.rs:4:18
12 LL | let a = vec![1, 2, 3];
13 | - move occurs because `a` has type `Vec<i32>`, which does not implement the `Copy` trait
18 | `a` moved due to this implicit call to `.into_iter()`, in previous iteration of loop
19 | help: consider borrowing to avoid moving into the for loop: `&a`
21 note: this function takes ownership of the receiver `self`, which moves `a`
22 --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
24 LL | fn into_iter(self) -> Self::IntoIter;
27 error: aborting due to 2 previous errors
29 Some errors have detailed explanations: E0382, E0505.
30 For more information about an error, try `rustc --explain E0382`.