fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
896 B21 linesraw
1error[E0382]: borrow of moved value: `bad_letters`
2  --> $DIR/issue-61108.rs:6:5
3   |
4LL |     let mut bad_letters = vec!['e', 't', 'o', 'i'];
5   |         --------------- move occurs because `bad_letters` has type `Vec<char>`, which does not implement the `Copy` trait
6LL |     for l in bad_letters {
7   |              ----------- `bad_letters` moved due to this implicit call to `.into_iter()`
8...
9LL |     bad_letters.push('s');
10   |     ^^^^^^^^^^^ value borrowed here after move
11   |
12note: `into_iter` takes ownership of the receiver `self`, which moves `bad_letters`
13  --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
14help: consider iterating over a slice of the `Vec<char>`'s content to avoid moving into the `for` loop
15   |
16LL |     for l in &bad_letters {
17   |              +
18
19error: aborting due to previous error
20
21For more information about this error, try `rustc --explain E0382`.