1
1
error[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
3
3
|
4
4
LL | for foo in foos { for bar in &bars { if foo == *bar {
5
5
| --- ---------------- inside of this loop
@@ -14,13 +14,13 @@ LL | qux.push(foo);
14
14
| ^^^ value used here after move
15
15
|
16
16
note: 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
18
18
|
19
19
LL | for foo in foos { for bar in &bars { if foo == *bar {
20
20
| --------------- ----------------
21
21
...
22
22
LL | 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
24
24
help: consider moving the expression out of the loop so it is only moved once
25
25
|
26
26
LL ~ for foo in foos { let mut value = baz.push(foo);
@@ -36,7 +36,7 @@ LL | baz.push(foo.clone());
36
36
| ++++++++
37
37
38
38
error[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
40
40
|
41
41
LL | for foo in foos {
42
42
| ---
@@ -54,7 +54,7 @@ LL | qux.push(foo);
54
54
| ^^^ value used here after move
55
55
|
56
56
note: 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
58
58
|
59
59
LL | for foo in foos {
60
60
| ---------------
@@ -63,7 +63,7 @@ LL | for bar in &bars {
63
63
| ----------------
64
64
...
65
65
LL | continue;
66
- | ^^^^^^^^ this `continue` advances the loop at line 33
66
+ | ^^^^^^^^ this `continue` advances the loop at line 36
67
67
help: consider moving the expression out of the loop so it is only moved once
68
68
|
69
69
LL ~ let mut value = baz.push(foo);
0 commit comments