summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/while_let_on_iterator.stderr
blob: 4d98666190d67ae43e41b6fcf575b734b2689ece (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:14: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`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:19:5
   |
LL |     while let Some(x) = iter.next() {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in iter`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:24:5
   |
LL |     while let Some(_) = iter.next() {}
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in iter`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:100:9
   |
LL |         while let Some([..]) = it.next() {}
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for [..] in it`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:107:9
   |
LL |         while let Some([_x]) = it.next() {}
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for [_x] in it`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:120:9
   |
LL |         while let Some(x @ [_]) = it.next() {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x @ [_] in it`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:140:9
   |
LL |         while let Some(_) = y.next() {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in y`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:197: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
  --> $DIR/while_let_on_iterator.rs:208:5
   |
LL |     while let Some(n) = it.next() {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in it`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:210:9
   |
LL |         while let Some(m) = it.next() {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:219:9
   |
LL |         while let Some(m) = it.next() {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:228: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
  --> $DIR/while_let_on_iterator.rs:245: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
  --> $DIR/while_let_on_iterator.rs:260: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
  --> $DIR/while_let_on_iterator.rs:292: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
  --> $DIR/while_let_on_iterator.rs:321: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
  --> $DIR/while_let_on_iterator.rs:333: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
  --> $DIR/while_let_on_iterator.rs:347: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
  --> $DIR/while_let_on_iterator.rs:358: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
  --> $DIR/while_let_on_iterator.rs:393: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
  --> $DIR/while_let_on_iterator.rs:400: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
  --> $DIR/while_let_on_iterator.rs:408:9
   |
LL |         while let Some(x) = it.next() {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:418:9
   |
LL |         while let Some(x) = it.next() {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:428: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
  --> $DIR/while_let_on_iterator.rs:438:9
   |
LL |         while let Some(x) = it.next() {
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it`

error: this loop could be written as a `for` loop
  --> $DIR/while_let_on_iterator.rs:448:5
   |
LL |     while let Some(..) = it.next() {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in it`

error: aborting due to 26 previous errors