]> git.lizzy.rs Git - rust.git/blob - tests/ui/while_let_on_iterator.stderr
Rollup merge of #5517 - flip1995:deploy_time_travel, r=Manishearth
[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:8: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:13: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:18: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:97:9
23    |
24 LL |         while let Some(_) = y.next() {
25    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in y`
26
27 error: this loop could be written as a `for` loop
28   --> $DIR/while_let_on_iterator.rs:122:5
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