1 error: this loop could be written as a `while let` loop
2 --> $DIR/while_loop.rs:9:5
13 note: lint level defined here
14 --> $DIR/while_loop.rs:4:9
16 4 | #![deny(while_let_loop, empty_loop, while_let_on_iterator)]
19 | while let Some(_x) = y { .. }
21 error: this loop could be written as a `while let` loop
22 --> $DIR/while_loop.rs:25:5
34 | while let Some(_x) = y { .. }
36 error: this loop could be written as a `while let` loop
37 --> $DIR/while_loop.rs:34:5
44 43 | | let _str = "foo";
49 | while let Some(x) = y { .. }
51 error: this loop could be written as a `while let` loop
52 --> $DIR/while_loop.rs:45:5
59 54 | | { let _b = "foobar"; }
64 | while let Some(x) = y { .. }
66 error: this loop could be written as a `while let` loop
67 --> $DIR/while_loop.rs:70:5
74 79 | | let _ = (e, l);
79 | while let Some(word) = "".split_whitespace().next() { .. }
81 error: this loop could be written as a `for` loop
82 --> $DIR/while_loop.rs:83:5
84 83 | / while let Option::Some(x) = iter.next() {
88 87 | | println!("{}", x);
92 note: lint level defined here
93 --> $DIR/while_loop.rs:4:37
95 4 | #![deny(while_let_loop, empty_loop, while_let_on_iterator)]
96 | ^^^^^^^^^^^^^^^^^^^^^
98 | for x in iter { .. }
100 error: this loop could be written as a `for` loop
101 --> $DIR/while_loop.rs:91:5
103 91 | / while let Some(x) = iter.next() {
107 95 | | println!("{}", x);
112 | for x in iter { .. }
114 error: this loop could be written as a `for` loop
115 --> $DIR/while_loop.rs:99:5
117 99 | while let Some(_) = iter.next() {}
118 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
121 | for _ in iter { .. }
123 error: this loop could be written as a `while let` loop
124 --> $DIR/while_loop.rs:142:5
136 | while let Some(ele) = iter.next() { .. }
138 error: empty `loop {}` detected. You may want to either use `panic!()` or add `std::thread::sleep(..);` to the loop body.
139 --> $DIR/while_loop.rs:150:9
144 note: lint level defined here
145 --> $DIR/while_loop.rs:4:25
147 4 | #![deny(while_let_loop, empty_loop, while_let_on_iterator)]
150 error: aborting due to 10 previous errors