]> git.lizzy.rs Git - rust.git/blob - tests/ui/while_let_on_iterator.stderr
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
[rust.git] / tests / ui / while_let_on_iterator.stderr
1 error: this loop could be written as a `for` loop
2   --> $DIR/while_let_on_iterator.rs:14:5
3    |
4 LL |     while let Option::Some(x) = iter.next() {
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in iter`
6    |
7    = note: `-D clippy::while-let-on-iterator` implied by `-D warnings`
8
9 error: this loop could be written as a `for` loop
10   --> $DIR/while_let_on_iterator.rs:19:5
11    |
12 LL |     while let Some(x) = iter.next() {
13    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in iter`
14
15 error: this loop could be written as a `for` loop
16   --> $DIR/while_let_on_iterator.rs:24:5
17    |
18 LL |     while let Some(_) = iter.next() {}
19    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in iter`
20
21 error: this loop could be written as a `for` loop
22   --> $DIR/while_let_on_iterator.rs:100:9
23    |
24 LL |         while let Some([..]) = it.next() {}
25    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for [..] in it`
26
27 error: this loop could be written as a `for` loop
28   --> $DIR/while_let_on_iterator.rs:107:9
29    |
30 LL |         while let Some([_x]) = it.next() {}
31    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for [_x] in it`
32
33 error: this loop could be written as a `for` loop
34   --> $DIR/while_let_on_iterator.rs:120:9
35    |
36 LL |         while let Some(x @ [_]) = it.next() {
37    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x @ [_] in it`
38
39 error: this loop could be written as a `for` loop
40   --> $DIR/while_let_on_iterator.rs:140:9
41    |
42 LL |         while let Some(_) = y.next() {
43    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in y`
44
45 error: this loop could be written as a `for` loop
46   --> $DIR/while_let_on_iterator.rs:197:9
47    |
48 LL |         while let Some(m) = it.next() {
49    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref()`
50
51 error: this loop could be written as a `for` loop
52   --> $DIR/while_let_on_iterator.rs:208:5
53    |
54 LL |     while let Some(n) = it.next() {
55    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in it`
56
57 error: this loop could be written as a `for` loop
58   --> $DIR/while_let_on_iterator.rs:210:9
59    |
60 LL |         while let Some(m) = it.next() {
61    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it`
62
63 error: this loop could be written as a `for` loop
64   --> $DIR/while_let_on_iterator.rs:219:9
65    |
66 LL |         while let Some(m) = it.next() {
67    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it`
68
69 error: this loop could be written as a `for` loop
70   --> $DIR/while_let_on_iterator.rs:228:9
71    |
72 LL |         while let Some(m) = it.next() {
73    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref()`
74
75 error: this loop could be written as a `for` loop
76   --> $DIR/while_let_on_iterator.rs:245:9
77    |
78 LL |         while let Some(m) = it.next() {
79    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in it.by_ref()`
80
81 error: this loop could be written as a `for` loop
82   --> $DIR/while_let_on_iterator.rs:260:13
83    |
84 LL |             while let Some(i) = self.0.next() {
85    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in self.0.by_ref()`
86
87 error: this loop could be written as a `for` loop
88   --> $DIR/while_let_on_iterator.rs:292:13
89    |
90 LL |             while let Some(i) = self.0.0.0.next() {
91    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in self.0.0.0.by_ref()`
92
93 error: this loop could be written as a `for` loop
94   --> $DIR/while_let_on_iterator.rs:321:5
95    |
96 LL |     while let Some(n) = it.next() {
97    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in it.by_ref()`
98
99 error: this loop could be written as a `for` loop
100   --> $DIR/while_let_on_iterator.rs:333:9
101    |
102 LL |         while let Some(x) = it.next() {
103    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()`
104
105 error: this loop could be written as a `for` loop
106   --> $DIR/while_let_on_iterator.rs:347:5
107    |
108 LL |     while let Some(x) = it.next() {
109    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()`
110
111 error: this loop could be written as a `for` loop
112   --> $DIR/while_let_on_iterator.rs:358:5
113    |
114 LL |     while let Some(x) = it.0.next() {
115    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.0.by_ref()`
116
117 error: this loop could be written as a `for` loop
118   --> $DIR/while_let_on_iterator.rs:393:5
119    |
120 LL |     while let Some(x) = s.x.next() {
121    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in s.x.by_ref()`
122
123 error: this loop could be written as a `for` loop
124   --> $DIR/while_let_on_iterator.rs:400:5
125    |
126 LL |     while let Some(x) = x[0].next() {
127    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in x[0].by_ref()`
128
129 error: this loop could be written as a `for` loop
130   --> $DIR/while_let_on_iterator.rs:408:9
131    |
132 LL |         while let Some(x) = it.next() {
133    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it`
134
135 error: this loop could be written as a `for` loop
136   --> $DIR/while_let_on_iterator.rs:418:9
137    |
138 LL |         while let Some(x) = it.next() {
139    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it`
140
141 error: this loop could be written as a `for` loop
142   --> $DIR/while_let_on_iterator.rs:428:9
143    |
144 LL |         while let Some(x) = it.next() {
145    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it.by_ref()`
146
147 error: this loop could be written as a `for` loop
148   --> $DIR/while_let_on_iterator.rs:438:9
149    |
150 LL |         while let Some(x) = it.next() {
151    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in it`
152
153 error: this loop could be written as a `for` loop
154   --> $DIR/while_let_on_iterator.rs:448:5
155    |
156 LL |     while let Some(..) = it.next() {
157    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in it`
158
159 error: aborting due to 26 previous errors
160