1 error: this loop could be written as a `while let` loop
5 10 | | if let Some(_x) = y {
11 | |_____^ help: try `while let Some(_x) = y { .. }`
13 = note: `-D while-let-loop` implied by `-D warnings`
15 error: this loop could be written as a `while let` loop
16 --> while_loop.rs:22:5
20 24 | | Some(_x) => true,
24 | |_____^ help: try `while let Some(_x) = y { .. }`
26 = note: `-D while-let-loop` implied by `-D warnings`
28 error: this loop could be written as a `while let` loop
29 --> while_loop.rs:28:5
32 29 | | let x = match y {
36 34 | | let _str = "foo";
38 | |_____^ help: try `while let Some(x) = y { .. }`
40 = note: `-D while-let-loop` implied by `-D warnings`
42 error: this loop could be written as a `while let` loop
43 --> while_loop.rs:36:5
46 37 | | let x = match y {
50 42 | | { let _b = "foobar"; }
52 | |_____^ help: try `while let Some(x) = y { .. }`
54 = note: `-D while-let-loop` implied by `-D warnings`
56 error: this loop could be written as a `while let` loop
57 --> while_loop.rs:58:5
60 59 | | let (e, l) = match "".split_whitespace().next() {
61 60 | | Some(word) => (word.is_empty(), word.len()),
64 64 | | let _ = (e, l);
66 | |_____^ help: try `while let Some(word) = "".split_whitespace().next() { .. }`
68 = note: `-D while-let-loop` implied by `-D warnings`
70 error: this loop could be written as a `for` loop
71 --> while_loop.rs:68:5
73 68 | / while let Option::Some(x) = iter.next() {
74 69 | | println!("{}", x);
76 | |_____^ help: try `for x in iter { .. }`
78 = note: `-D while-let-on-iterator` implied by `-D warnings`
80 error: this loop could be written as a `for` loop
81 --> while_loop.rs:73:5
83 73 | / while let Some(x) = iter.next() {
84 74 | | println!("{}", x);
86 | |_____^ help: try `for x in iter { .. }`
88 = note: `-D while-let-on-iterator` implied by `-D warnings`
90 error: this loop could be written as a `for` loop
91 --> while_loop.rs:78:5
93 78 | while let Some(_) = iter.next() {}
94 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try `for _ in iter { .. }`
96 = note: `-D while-let-on-iterator` implied by `-D warnings`
98 error: this loop could be written as a `while let` loop
99 --> while_loop.rs:118:5
102 119 | | let _ = match iter.next() {
103 120 | | Some(ele) => ele,
104 121 | | None => break
108 | |_____^ help: try `while let Some(ele) = iter.next() { .. }`
110 = note: `-D while-let-loop` implied by `-D warnings`
112 error: empty `loop {}` detected. You may want to either use `panic!()` or add `std::thread::sleep(..);` to the loop body.
113 --> while_loop.rs:123:9
118 = note: `-D empty-loop` implied by `-D warnings`
120 error: aborting due to previous error(s)
123 To learn more, run the command again with --verbose.