2017-02-16 21:53:14 -06:00
|
|
|
error: this loop never actually loops
|
|
|
|
--> $DIR/never_loop.rs:8:5
|
|
|
|
|
|
2017-04-23 08:25:22 -05:00
|
|
|
8 | / loop {
|
2017-02-16 21:53:14 -06:00
|
|
|
9 | | println!("This is only ever printed once");
|
|
|
|
10 | | break;
|
|
|
|
11 | | }
|
2017-04-23 08:25:22 -05:00
|
|
|
| |_____^
|
2017-02-16 21:53:14 -06:00
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/never_loop.rs:4:9
|
|
|
|
|
|
|
|
|
4 | #![deny(never_loop)]
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: this loop never actually loops
|
|
|
|
--> $DIR/never_loop.rs:21:5
|
|
|
|
|
|
2017-04-23 08:25:22 -05:00
|
|
|
21 | / loop {
|
2017-02-16 21:53:14 -06:00
|
|
|
22 | | loop {
|
|
|
|
23 | | // another one
|
|
|
|
24 | | break;
|
|
|
|
25 | | }
|
|
|
|
26 | | break;
|
|
|
|
27 | | }
|
2017-04-23 08:25:22 -05:00
|
|
|
| |_____^
|
2017-02-16 21:53:14 -06:00
|
|
|
|
|
|
|
error: this loop never actually loops
|
|
|
|
--> $DIR/never_loop.rs:22:9
|
|
|
|
|
|
2017-04-23 08:25:22 -05:00
|
|
|
22 | / loop {
|
2017-02-16 21:53:14 -06:00
|
|
|
23 | | // another one
|
|
|
|
24 | | break;
|
|
|
|
25 | | }
|
2017-04-23 08:25:22 -05:00
|
|
|
| |_________^
|
2017-02-16 21:53:14 -06:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|