1 error: this loop could be written as a `for` loop
2 --> $DIR/while_let_on_iterator.rs:14: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:19: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:24: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:100: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:107: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:120: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:140:9
42 LL | while let Some(_) = y.next() {
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in y`
45 error: this loop could be written as a `for` loop
46 --> $DIR/while_let_on_iterator.rs:197:9
48 LL | while let Some(m) = it.next() {
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref()`
51 error: this loop could be written as a `for` loop
52 --> $DIR/while_let_on_iterator.rs:208:5
54 LL | while let Some(n) = it.next() {
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in it`
57 error: this loop could be written as a `for` loop
58 --> $DIR/while_let_on_iterator.rs:210:9
60 LL | while let Some(m) = it.next() {
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it`
63 error: this loop could be written as a `for` loop
64 --> $DIR/while_let_on_iterator.rs:219:9
66 LL | while let Some(m) = it.next() {
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it`
69 error: this loop could be written as a `for` loop
70 --> $DIR/while_let_on_iterator.rs:228:9
72 LL | while let Some(m) = it.next() {
73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref()`
75 error: this loop could be written as a `for` loop
76 --> $DIR/while_let_on_iterator.rs:245:9
78 LL | while let Some(m) = it.next() {
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref()`
81 error: this loop could be written as a `for` loop
82 --> $DIR/while_let_on_iterator.rs:260:13
84 LL | while let Some(i) = self.0.next() {
85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in self.0.by_ref()`
87 error: this loop could be written as a `for` loop
88 --> $DIR/while_let_on_iterator.rs:292:13
90 LL | while let Some(i) = self.0.0.0.next() {
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in self.0.0.0.by_ref()`
93 error: this loop could be written as a `for` loop
94 --> $DIR/while_let_on_iterator.rs:321:5
96 LL | while let Some(n) = it.next() {
97 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in it.by_ref()`
99 error: this loop could be written as a `for` loop
100 --> $DIR/while_let_on_iterator.rs:333:9
102 LL | while let Some(x) = it.next() {
103 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()`
105 error: this loop could be written as a `for` loop
106 --> $DIR/while_let_on_iterator.rs:347:5
108 LL | while let Some(x) = it.next() {
109 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()`
111 error: this loop could be written as a `for` loop
112 --> $DIR/while_let_on_iterator.rs:358:5
114 LL | while let Some(x) = it.0.next() {
115 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.0.by_ref()`
117 error: this loop could be written as a `for` loop
118 --> $DIR/while_let_on_iterator.rs:393:5
120 LL | while let Some(x) = s.x.next() {
121 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in s.x.by_ref()`
123 error: this loop could be written as a `for` loop
124 --> $DIR/while_let_on_iterator.rs:400:5
126 LL | while let Some(x) = x[0].next() {
127 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in x[0].by_ref()`
129 error: this loop could be written as a `for` loop
130 --> $DIR/while_let_on_iterator.rs:408:9
132 LL | while let Some(x) = it.next() {
133 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it`
135 error: this loop could be written as a `for` loop
136 --> $DIR/while_let_on_iterator.rs:418:9
138 LL | while let Some(x) = it.next() {
139 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it`
141 error: this loop could be written as a `for` loop
142 --> $DIR/while_let_on_iterator.rs:428:9
144 LL | while let Some(x) = it.next() {
145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()`
147 error: this loop could be written as a `for` loop
148 --> $DIR/while_let_on_iterator.rs:438:9
150 LL | while let Some(x) = it.next() {
151 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it`
153 error: this loop could be written as a `for` loop
154 --> $DIR/while_let_on_iterator.rs:448:5
156 LL | while let Some(..) = it.next() {
157 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in it`
159 error: aborting due to 26 previous errors