101 lines
2.1 KiB
Plaintext
101 lines
2.1 KiB
Plaintext
error: this loop never actually loops
|
|
--> $DIR/never_loop.rs:19:5
|
|
|
|
|
LL | / loop {
|
|
LL | | // clippy::never_loop
|
|
LL | | x += 1;
|
|
LL | | if x == 1 {
|
|
... |
|
|
LL | | break;
|
|
LL | | }
|
|
| |_____^
|
|
|
|
|
= note: #[deny(clippy::never_loop)] on by default
|
|
|
|
error: this loop never actually loops
|
|
--> $DIR/never_loop.rs:41:5
|
|
|
|
|
LL | / loop {
|
|
LL | | // never loops
|
|
LL | | x += 1;
|
|
LL | | break;
|
|
LL | | }
|
|
| |_____^
|
|
|
|
error: this loop never actually loops
|
|
--> $DIR/never_loop.rs:61:5
|
|
|
|
|
LL | / loop {
|
|
LL | | // never loops
|
|
LL | | while i == 0 {
|
|
LL | | // never loops
|
|
... |
|
|
LL | | return;
|
|
LL | | }
|
|
| |_____^
|
|
|
|
error: this loop never actually loops
|
|
--> $DIR/never_loop.rs:63:9
|
|
|
|
|
LL | / while i == 0 {
|
|
LL | | // never loops
|
|
LL | | break;
|
|
LL | | }
|
|
| |_________^
|
|
|
|
error: this loop never actually loops
|
|
--> $DIR/never_loop.rs:75:9
|
|
|
|
|
LL | / loop {
|
|
LL | | // never loops
|
|
LL | | if x == 5 {
|
|
LL | | break;
|
|
LL | | }
|
|
LL | | continue 'outer;
|
|
LL | | }
|
|
| |_________^
|
|
|
|
error: this loop never actually loops
|
|
--> $DIR/never_loop.rs:111:5
|
|
|
|
|
LL | / while let Some(y) = x {
|
|
LL | | // never loops
|
|
LL | | return;
|
|
LL | | }
|
|
| |_____^
|
|
|
|
error: this loop never actually loops
|
|
--> $DIR/never_loop.rs:118:5
|
|
|
|
|
LL | / for x in 0..10 {
|
|
LL | | // never loops
|
|
LL | | match x {
|
|
LL | | 1 => break,
|
|
LL | | _ => return,
|
|
LL | | }
|
|
LL | | }
|
|
| |_____^
|
|
|
|
error: this loop never actually loops
|
|
--> $DIR/never_loop.rs:166:5
|
|
|
|
|
LL | / 'outer: while a {
|
|
LL | | // never loops
|
|
LL | | while a {
|
|
LL | | if a {
|
|
... |
|
|
LL | | break 'outer;
|
|
LL | | }
|
|
| |_____^
|
|
|
|
error: this loop never actually loops
|
|
--> $DIR/never_loop.rs:181:9
|
|
|
|
|
LL | / while false {
|
|
LL | | break 'label;
|
|
LL | | }
|
|
| |_________^
|
|
|
|
error: aborting due to 9 previous errors
|
|
|