]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/while_let_on_iterator.stderr
New upstream version 1.55.0+dfsg1
[rustc.git] / src / tools / clippy / 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:8: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:13: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:18: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:94: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:101: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:114: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:134: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:191:9
47 |
48 LL | while let Some(m) = it.next() {
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in &mut it`
50
51 error: this loop could be written as a `for` loop
52 --> $DIR/while_let_on_iterator.rs:202: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:204: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:213: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:222:9
71 |
72 LL | while let Some(m) = it.next() {
73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in &mut it`
74
75 error: this loop could be written as a `for` loop
76 --> $DIR/while_let_on_iterator.rs:239:9
77 |
78 LL | while let Some(m) = it.next() {
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for m in &mut it`
80
81 error: this loop could be written as a `for` loop
82 --> $DIR/while_let_on_iterator.rs:254:13
83 |
84 LL | while let Some(i) = self.0.next() {
85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in &mut self.0`
86
87 error: manual `!RangeInclusive::contains` implementation
88 --> $DIR/while_let_on_iterator.rs:255:20
89 |
90 LL | if i < 3 || i > 7 {
91 | ^^^^^^^^^^^^^^ help: use: `!(3..=7).contains(&i)`
92 |
93 = note: `-D clippy::manual-range-contains` implied by `-D warnings`
94
95 error: this loop could be written as a `for` loop
96 --> $DIR/while_let_on_iterator.rs:286:13
97 |
98 LL | while let Some(i) = self.0.0.0.next() {
99 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for i in &mut self.0.0.0`
100
101 error: this loop could be written as a `for` loop
102 --> $DIR/while_let_on_iterator.rs:315:5
103 |
104 LL | while let Some(n) = it.next() {
105 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for n in &mut it`
106
107 error: this loop could be written as a `for` loop
108 --> $DIR/while_let_on_iterator.rs:327:9
109 |
110 LL | while let Some(x) = it.next() {
111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for x in &mut it`
112
113 error: this loop could be written as a `for` loop
114 --> $DIR/while_let_on_iterator.rs:339:5
115 |
116 LL | while let Some(..) = it.next() {
117 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for _ in it`
118
119 error: aborting due to 19 previous errors
120