11error[E0382]: use of moved value: `foo`
2- --> $DIR/nested-loop-moved-value-wrong-continue.rs:19 :14
2+ --> $DIR/nested-loop-moved-value-wrong-continue.rs:21 :14
33 |
44LL | for foo in foos { for bar in &bars { if foo == *bar {
55 | --- ---------------- inside of this loop
@@ -14,13 +14,13 @@ LL | qux.push(foo);
1414 | ^^^ value used here after move
1515 |
1616note: verify that your loop breaking logic is correct
17- --> $DIR/nested-loop-moved-value-wrong-continue.rs:15 :9
17+ --> $DIR/nested-loop-moved-value-wrong-continue.rs:17 :9
1818 |
1919LL | for foo in foos { for bar in &bars { if foo == *bar {
2020 | --------------- ----------------
2121...
2222LL | continue;
23- | ^^^^^^^^ this `continue` advances the loop at $DIR/nested-loop-moved-value-wrong-continue.rs:6:23: 18 :8
23+ | ^^^^^^^^ this `continue` advances the loop at $DIR/nested-loop-moved-value-wrong-continue.rs:6:23: 20 :8
2424help: consider moving the expression out of the loop so it is only moved once
2525 |
2626LL ~ for foo in foos { let mut value = baz.push(foo);
@@ -36,7 +36,7 @@ LL | baz.push(foo.clone());
3636 | ++++++++
3737
3838error[E0382]: use of moved value: `foo`
39- --> $DIR/nested-loop-moved-value-wrong-continue.rs:46 :18
39+ --> $DIR/nested-loop-moved-value-wrong-continue.rs:50 :18
4040 |
4141LL | for foo in foos {
4242 | ---
@@ -54,7 +54,7 @@ LL | qux.push(foo);
5454 | ^^^ value used here after move
5555 |
5656note: verify that your loop breaking logic is correct
57- --> $DIR/nested-loop-moved-value-wrong-continue.rs:41 :17
57+ --> $DIR/nested-loop-moved-value-wrong-continue.rs:45 :17
5858 |
5959LL | for foo in foos {
6060 | ---------------
@@ -63,7 +63,7 @@ LL | for bar in &bars {
6363 | ----------------
6464...
6565LL | continue;
66- | ^^^^^^^^ this `continue` advances the loop at line 33
66+ | ^^^^^^^^ this `continue` advances the loop at line 36
6767help: consider moving the expression out of the loop so it is only moved once
6868 |
6969LL ~ let mut value = baz.push(foo);
0 commit comments