fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0499]: cannot borrow `chars` as mutable more than once at a time 2 --> $DIR/issue-102972.rs:4:9 3 | 4LL | for _c in chars.by_ref() { 5 | -------------- 6 | | 7 | first mutable borrow occurs here 8 | first borrow later used here 9LL | chars.next(); 10 | ^^^^^ second mutable borrow occurs here 11 12error[E0382]: borrow of moved value: `iter` 13 --> $DIR/issue-102972.rs:12:9 14 | 15LL | let mut iter = v.iter(); 16 | -------- move occurs because `iter` has type `std::slice::Iter<'_, i32>`, which does not implement the `Copy` trait 17LL | for _i in iter { 18 | ---- `iter` moved due to this implicit call to `.into_iter()` 19LL | iter.next(); 20 | ^^^^ value borrowed here after move 21 | 22note: `into_iter` takes ownership of the receiver `self`, which moves `iter` 23 --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL 24 25error: aborting due to 2 previous errors 26 27Some errors have detailed explanations: E0382, E0499. 28For more information about an error, try `rustc --explain E0382`.