2023-09-02 12:12:05 +00:00
|
|
|
error: this loop never actually loops
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/crashes/ice-360.rs:5:5
|
2023-09-02 12:12:05 +00:00
|
|
|
|
|
|
|
|
LL | / loop {
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
LL | |
|
|
|
|
... |
|
|
|
|
LL | |
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: `#[deny(clippy::never_loop)]` on by default
|
|
|
|
|
2019-05-08 07:19:08 +00:00
|
|
|
error: this loop could be written as a `while let` loop
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/crashes/ice-360.rs:5:5
|
2019-05-08 07:19:08 +00:00
|
|
|
|
|
|
|
|
LL | / loop {
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | |
|
|
|
|
LL | |
|
2023-09-02 12:12:05 +00:00
|
|
|
LL | |
|
2023-08-24 19:32:12 +00:00
|
|
|
... |
|
|
|
|
LL | |
|
2019-05-08 07:19:08 +00:00
|
|
|
LL | | }
|
|
|
|
| |_____^ help: try: `while let Some(ele) = iter.next() { .. }`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::while-let-loop` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::while_let_loop)]`
|
2019-05-08 07:19:08 +00:00
|
|
|
|
2020-10-28 22:36:07 +00:00
|
|
|
error: empty `loop {}` wastes CPU cycles
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/crashes/ice-360.rs:13:9
|
2019-05-08 07:19:08 +00:00
|
|
|
|
|
|
|
|
LL | loop {}
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
2020-11-23 12:51:04 +00:00
|
|
|
= help: you should either use `panic!()` or add `std::thread::sleep(..);` to the loop body
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::empty-loop` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::empty_loop)]`
|
2019-05-08 07:19:08 +00:00
|
|
|
|
2023-09-02 12:12:05 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2019-05-08 07:19:08 +00:00
|
|
|
|