| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:15:5 |
| | |
| LL | while let Option::Some(x) = iter.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in iter` |
| | |
| = note: `-D clippy::while-let-on-iterator` implied by `-D warnings` |
| = help: to override `-D warnings` add `#[allow(clippy::while_let_on_iterator)]` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:21:5 |
| | |
| LL | while let Some(x) = iter.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in iter` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:27:5 |
| | |
| LL | while let Some(_) = iter.next() {} |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in iter` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:104:9 |
| | |
| LL | while let Some([..]) = it.next() {} |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for [..] in it` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:112:9 |
| | |
| LL | while let Some([_x]) = it.next() {} |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for [_x] in it` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:126:9 |
| | |
| LL | while let Some(x @ [_]) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x @ [_] in it` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:147:9 |
| | |
| LL | while let Some(_) = y.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in y` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:205:9 |
| | |
| LL | while let Some(m) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:217:5 |
| | |
| LL | while let Some(n) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in it` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:220:9 |
| | |
| LL | while let Some(m) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:230:9 |
| | |
| LL | while let Some(m) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:240:9 |
| | |
| LL | while let Some(m) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:258:9 |
| | |
| LL | while let Some(m) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:274:13 |
| | |
| LL | while let Some(i) = self.0.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in self.0.by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:307:13 |
| | |
| LL | while let Some(i) = self.0.0.0.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in self.0.0.0.by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:337:5 |
| | |
| LL | while let Some(n) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in it.by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:350:9 |
| | |
| LL | while let Some(x) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:365:5 |
| | |
| LL | while let Some(x) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:377:5 |
| | |
| LL | while let Some(x) = it.0.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.0.by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:413:5 |
| | |
| LL | while let Some(x) = s.x.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in s.x.by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:421:5 |
| | |
| LL | while let Some(x) = x[0].next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in x[0].by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:430:9 |
| | |
| LL | while let Some(x) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:441:9 |
| | |
| LL | while let Some(x) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:452:9 |
| | |
| LL | while let Some(x) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:463:9 |
| | |
| LL | while let Some(x) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:476:9 |
| | |
| LL | while let Some(x) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:487:5 |
| | |
| LL | 'label: while let Some(n) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `'label: for n in it` |
| |
| error: this loop could be written as a `for` loop |
| --> tests/ui/while_let_on_iterator.rs:497:5 |
| | |
| LL | while let Some(..) = it.next() { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in it` |
| |
| error: aborting due to 28 previous errors |
| |