1 error: this loop could be written as a `for` loop
2 --> $DIR/while_let_on_iterator.rs:8:5
4 LL | while let Option::Some(x) = iter.next() {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in iter`
7 = note: `-D clippy::while-let-on-iterator` implied by `-D warnings`
9 error: this loop could be written as a `for` loop
10 --> $DIR/while_let_on_iterator.rs:13:5
12 LL | while let Some(x) = iter.next() {
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in iter`
15 error: this loop could be written as a `for` loop
16 --> $DIR/while_let_on_iterator.rs:18:5
18 LL | while let Some(_) = iter.next() {}
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in iter`
21 error: this loop could be written as a `for` loop
22 --> $DIR/while_let_on_iterator.rs:101:9
24 LL | while let Some([..]) = it.next() {}
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for [..] in it`
27 error: this loop could be written as a `for` loop
28 --> $DIR/while_let_on_iterator.rs:108:9
30 LL | while let Some([_x]) = it.next() {}
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for [_x] in it`
33 error: this loop could be written as a `for` loop
34 --> $DIR/while_let_on_iterator.rs:121:9
36 LL | while let Some(x @ [_]) = it.next() {
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x @ [_] in it`
39 error: this loop could be written as a `for` loop
40 --> $DIR/while_let_on_iterator.rs:153:9
42 LL | while let Some(_) = y.next() {
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in y`
45 error: aborting due to 7 previous errors