]> git.lizzy.rs Git - rust.git/blob - tests/ui/while_let_on_iterator.stderr
Auto merge of #68717 - petrochenkov:stabexpat, r=varkor
[rust.git] / tests / ui / while_let_on_iterator.stderr
1 error: this loop could be written as a `for` loop
2   --> $DIR/while_let_on_iterator.rs:9:5
3    |
4 LL |     while let Option::Some(x) = iter.next() {
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in iter`
6    |
7    = note: `-D clippy::while-let-on-iterator` implied by `-D warnings`
8
9 error: this loop could be written as a `for` loop
10   --> $DIR/while_let_on_iterator.rs:14:5
11    |
12 LL |     while let Some(x) = iter.next() {
13    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in iter`
14
15 error: this loop could be written as a `for` loop
16   --> $DIR/while_let_on_iterator.rs:19:5
17    |
18 LL |     while let Some(_) = iter.next() {}
19    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in iter`
20
21 error: this loop could be written as a `for` loop
22   --> $DIR/while_let_on_iterator.rs:102:9
23    |
24 LL |         while let Some([..]) = it.next() {}
25    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for [..] in it`
26
27 error: this loop could be written as a `for` loop
28   --> $DIR/while_let_on_iterator.rs:109:9
29    |
30 LL |         while let Some([_x]) = it.next() {}
31    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for [_x] in it`
32
33 error: this loop could be written as a `for` loop
34   --> $DIR/while_let_on_iterator.rs:122:9
35    |
36 LL |         while let Some(x @ [_]) = it.next() {
37    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x @ [_] in it`
38
39 error: this loop could be written as a `for` loop
40   --> $DIR/while_let_on_iterator.rs:154:9
41    |
42 LL |         while let Some(_) = y.next() {
43    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in y`
44
45 error: aborting due to 7 previous errors
46