2017-02-07 21:05:30 +01:00
|
|
|
error: this loop could be written as a `for` loop
|
2024-02-27 15:25:18 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:15:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | while let Option::Some(x) = iter.next() {
|
2020-04-25 20:01:22 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in iter`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
= note: `-D clippy::while-let-on-iterator` implied by `-D warnings`
|
2023-08-01 14:02:21 +02:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::while_let_on_iterator)]`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:21:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | while let Some(x) = iter.next() {
|
2020-04-25 20:01:22 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in iter`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:27:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | while let Some(_) = iter.next() {}
|
2020-04-25 20:01:22 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in iter`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
2017-08-01 00:58:26 +02:00
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:104:9
|
2020-05-11 20:23:47 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some([..]) = it.next() {}
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for [..] in it`
|
|
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:112:9
|
2020-05-11 20:23:47 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some([_x]) = it.next() {}
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for [_x] in it`
|
|
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:126:9
|
2020-05-11 20:23:47 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(x @ [_]) = it.next() {
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x @ [_] in it`
|
|
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:147:9
|
2018-12-27 16:57:55 +01:00
|
|
|
|
|
2020-04-25 20:01:22 +02:00
|
|
|
LL | while let Some(_) = y.next() {
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in y`
|
2017-08-01 00:58:26 +02:00
|
|
|
|
2021-05-20 12:30:31 +02:00
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:205:9
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(m) = it.next() {
|
2021-09-28 18:03:12 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref()`
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:217:5
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(n) = it.next() {
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in it`
|
|
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:220:9
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(m) = it.next() {
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it`
|
|
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:230:9
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(m) = it.next() {
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it`
|
|
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:240:9
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(m) = it.next() {
|
2021-09-28 18:03:12 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref()`
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:258:9
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(m) = it.next() {
|
2021-09-28 18:03:12 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref()`
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:274:13
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(i) = self.0.next() {
|
2021-09-28 18:03:12 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in self.0.by_ref()`
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:307:13
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(i) = self.0.0.0.next() {
|
2021-09-28 18:03:12 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in self.0.0.0.by_ref()`
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:337:5
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(n) = it.next() {
|
2021-09-28 18:03:12 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in it.by_ref()`
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:350:9
|
2021-07-01 18:17:38 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(x) = it.next() {
|
2021-09-28 18:03:12 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()`
|
2021-07-01 18:17:38 +02:00
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:365:5
|
2021-08-12 11:16:25 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(x) = it.next() {
|
2021-09-28 18:03:12 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()`
|
2021-08-12 11:16:25 +02:00
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:377:5
|
2021-08-12 11:16:25 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(x) = it.0.next() {
|
2021-09-28 18:03:12 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.0.by_ref()`
|
2021-08-12 11:16:25 +02:00
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:413:5
|
2022-01-13 13:18:19 +01:00
|
|
|
|
|
|
|
|
|
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
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:421:5
|
2022-01-13 13:18:19 +01:00
|
|
|
|
|
|
|
|
|
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
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:430:9
|
2022-07-18 09:39:37 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(x) = it.next() {
|
2024-02-08 20:24:42 +01:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()`
|
2022-07-18 09:39:37 +02:00
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:441:9
|
2022-07-18 09:39:37 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(x) = it.next() {
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it`
|
|
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:452:9
|
2022-07-18 09:39:37 +02:00
|
|
|
|
|
|
|
|
|
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
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:463:9
|
2022-07-18 09:39:37 +02:00
|
|
|
|
|
|
|
|
|
LL | while let Some(x) = it.next() {
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it`
|
|
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:476:9
|
2024-02-08 20:24:42 +01:00
|
|
|
|
|
|
|
|
|
LL | while let Some(x) = it.next() {
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it`
|
|
|
|
|
|
|
|
|
|
error: this loop could be written as a `for` loop
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:487:5
|
2021-05-20 12:30:31 +02:00
|
|
|
|
|
2024-08-08 19:13:50 +02:00
|
|
|
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
|
2025-02-28 23:20:48 +01:00
|
|
|
--> tests/ui/while_let_on_iterator.rs:497:5
|
2024-08-08 19:13:50 +02:00
|
|
|
|
|
2021-05-20 12:30:31 +02:00
|
|
|
LL | while let Some(..) = it.next() {
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in it`
|
|
|
|
|
|
2024-08-08 19:13:50 +02:00
|
|
|
error: aborting due to 28 previous errors
|
2018-01-16 17:06:27 +01:00
|
|
|
|