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: manual `!RangeInclusive::contains` implementation
88 --> $DIR/while_let_on_iterator.rs:261:20
90 LL | if i < 3 || i > 7 {
91 | ^^^^^^^^^^^^^^ help: use: `!(3..=7).contains(&i)`
93 = note: `-D clippy::manual-range-contains` implied by `-D warnings`
95 error: this loop could be written as a `for` loop
96 --> $DIR/while_let_on_iterator.rs:292:13
98 LL | while let Some(i) = self.0.0.0.next() {
99 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in self.0.0.0.by_ref()`
101 error: this loop could be written as a `for` loop
102 --> $DIR/while_let_on_iterator.rs:321:5
104 LL | while let Some(n) = it.next() {
105 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in it.by_ref()`
107 error: this loop could be written as a `for` loop
108 --> $DIR/while_let_on_iterator.rs:333:9
110 LL | while let Some(x) = it.next() {
111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()`
113 error: this loop could be written as a `for` loop
114 --> $DIR/while_let_on_iterator.rs:347:5
116 LL | while let Some(x) = it.next() {
117 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()`
119 error: this loop could be written as a `for` loop
120 --> $DIR/while_let_on_iterator.rs:358:5
122 LL | while let Some(x) = it.0.next() {
123 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.0.by_ref()`
125 error: this loop could be written as a `for` loop
126 --> $DIR/while_let_on_iterator.rs:377:5
128 LL | while let Some(..) = it.next() {
129 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in it`
131 error: aborting due to 21 previous errors