]> git.lizzy.rs Git - rust.git/blob - tests/ui/while_let_on_iterator.stderr
Auto merge of #4478 - tsurai:master, r=flip1995
[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:6:33
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:11:25
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:16:25
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:95:29
23    |
24 LL |         while let Some(v) = y.next() {
25    |                             ^^^^^^^^ help: try: `for v in y { .. }`
26
27 error: this loop could be written as a `for` loop
28   --> $DIR/while_let_on_iterator.rs:120:26
29    |
30 LL |     while let Some(..) = values.iter().next() {
31    |                          ^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in values.iter() { .. }`
32
33 error: aborting due to 5 previous errors
34