2017-02-17 03:53:14 +00:00
|
|
|
error: this loop never actually loops
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/never_loop.rs:19:5
|
2017-02-17 03:53:14 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / loop {
|
|
|
|
LL | | // clippy::never_loop
|
|
|
|
LL | | x += 1;
|
|
|
|
LL | | if x == 1 {
|
2018-12-10 05:27:19 +00:00
|
|
|
... |
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | | break;
|
|
|
|
LL | | }
|
2017-04-23 13:25:22 +00:00
|
|
|
| |_____^
|
2017-02-17 03:53:14 +00:00
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: #[deny(clippy::never_loop)] on by default
|
2017-02-17 03:53:14 +00:00
|
|
|
|
|
|
|
error: this loop never actually loops
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/never_loop.rs:41:5
|
2017-02-17 03:53:14 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / loop {
|
|
|
|
LL | | // never loops
|
|
|
|
LL | | x += 1;
|
|
|
|
LL | | break;
|
|
|
|
LL | | }
|
2017-04-23 13:25:22 +00:00
|
|
|
| |_____^
|
2017-02-17 03:53:14 +00:00
|
|
|
|
2017-06-01 04:22:15 +00:00
|
|
|
error: this loop never actually loops
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/never_loop.rs:61:5
|
2017-06-01 04:22:15 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / loop {
|
|
|
|
LL | | // never loops
|
|
|
|
LL | | while i == 0 {
|
|
|
|
LL | | // never loops
|
2018-12-10 05:27:19 +00:00
|
|
|
... |
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | | return;
|
|
|
|
LL | | }
|
2017-12-07 10:20:48 +00:00
|
|
|
| |_____^
|
2017-06-01 04:22:15 +00:00
|
|
|
|
|
|
|
error: this loop never actually loops
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/never_loop.rs:63:9
|
2017-06-01 04:22:15 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / while i == 0 {
|
|
|
|
LL | | // never loops
|
|
|
|
LL | | break;
|
|
|
|
LL | | }
|
2017-06-01 04:22:15 +00:00
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: this loop never actually loops
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/never_loop.rs:75:9
|
2017-06-01 04:22:15 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | / loop {
|
|
|
|
LL | | // never loops
|
|
|
|
LL | | if x == 5 {
|
|
|
|
LL | | break;
|
|
|
|
LL | | }
|
|
|
|
LL | | continue 'outer;
|
|
|
|
LL | | }
|
2017-12-07 10:20:48 +00:00
|
|
|
| |_________^
|
2017-06-01 04:22:15 +00:00
|
|
|
|
|
|
|
error: this loop never actually loops
|
2018-12-27 15:57:55 +00:00
|
|
|
--> $DIR/never_loop.rs:111:5
|
|
|
|
|
|
|
|
|
LL | / while let Some(y) = x {
|
|
|
|
LL | | // never loops
|
|
|
|
LL | | return;
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
2017-06-01 04:22:15 +00:00
|
|
|
|
|
|
|
error: this loop never actually loops
|
2018-12-27 15:57:55 +00:00
|
|
|
--> $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 | | }
|
|
|
|
| |_____^
|
2017-06-01 04:22:15 +00:00
|
|
|
|
2017-10-08 22:26:39 +00:00
|
|
|
error: this loop never actually loops
|
2018-12-27 15:57:55 +00:00
|
|
|
--> $DIR/never_loop.rs:166:5
|
|
|
|
|
|
|
|
|
LL | / 'outer: while a {
|
|
|
|
LL | | // never loops
|
|
|
|
LL | | while a {
|
|
|
|
LL | | if a {
|
|
|
|
... |
|
|
|
|
LL | | break 'outer;
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
2017-10-08 22:26:39 +00:00
|
|
|
|
2017-11-05 14:43:28 +00:00
|
|
|
error: this loop never actually loops
|
2018-12-27 15:57:55 +00:00
|
|
|
--> $DIR/never_loop.rs:181:9
|
|
|
|
|
|
|
|
|
LL | / while false {
|
|
|
|
LL | | break 'label;
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
2017-11-05 14:43:28 +00:00
|
|
|
|
2018-01-16 16:06:27 +00:00
|
|
|
error: aborting due to 9 previous errors
|
|
|
|
|