summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/crashes/ice-360.stderr
blob: a2e2ab8fd192f3172a8d931416fe310df6acf72b (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
error: this loop could be written as a `while let` loop
  --> $DIR/ice-360.rs:5:5
   |
LL | /     loop {
LL | |         let _ = match iter.next() {
LL | |             Some(ele) => ele,
LL | |             None => break,
LL | |         };
LL | |         loop {}
LL | |     }
   | |_____^ help: try: `while let Some(ele) = iter.next() { .. }`
   |
   = note: `-D clippy::while-let-loop` implied by `-D warnings`

error: empty `loop {}` wastes CPU cycles
  --> $DIR/ice-360.rs:10:9
   |
LL |         loop {}
   |         ^^^^^^^
   |
   = help: you should either use `panic!()` or add `std::thread::sleep(..);` to the loop body
   = note: `-D clippy::empty-loop` implied by `-D warnings`

error: aborting due to 2 previous errors