rust/tests/ui/never_loop.stderr

95 lines
2.0 KiB
Plaintext
Raw Normal View History

error: this loop never actually loops
2017-08-01 17:54:21 +02:00
--> $DIR/never_loop.rs:7:5
|
7 | / loop { // clippy::never_loop
2017-06-01 06:22:15 +02:00
8 | | x += 1;
9 | | if x == 1 {
10 | | return
11 | | }
12 | | break;
13 | | }
| |_____^
|
= note: #[deny(clippy::never_loop)] on by default
error: this loop never actually loops
2017-08-01 17:54:21 +02:00
--> $DIR/never_loop.rs:28:5
|
2017-06-01 06:22:15 +02:00
28 | / loop { // never loops
29 | | x += 1;
30 | | break
31 | | }
| |_____^
2017-06-01 06:22:15 +02:00
error: this loop never actually loops
2017-08-01 17:54:21 +02:00
--> $DIR/never_loop.rs:47:2
2017-06-01 06:22:15 +02:00
|
47 | loop { // never loops
| _____^
48 | | while i == 0 { // never loops
49 | | break
50 | | }
51 | | return
52 | | }
| |_____^
2017-06-01 06:22:15 +02:00
error: this loop never actually loops
2017-08-01 17:54:21 +02:00
--> $DIR/never_loop.rs:48:9
2017-06-01 06:22:15 +02:00
|
48 | / while i == 0 { // never loops
49 | | break
50 | | }
| |_________^
error: this loop never actually loops
2017-08-01 17:54:21 +02:00
--> $DIR/never_loop.rs:59:3
2017-06-01 06:22:15 +02:00
|
59 | loop { // never loops
| _________^
60 | | if x == 5 { break }
61 | | continue 'outer
62 | | }
| |_________^
2017-06-01 06:22:15 +02:00
error: this loop never actually loops
2017-08-01 17:54:21 +02:00
--> $DIR/never_loop.rs:92:5
2017-06-01 06:22:15 +02:00
|
92 | / while let Some(y) = x { // never loops
93 | | return
94 | | }
| |_____^
error: this loop never actually loops
2017-08-01 17:54:21 +02:00
--> $DIR/never_loop.rs:98:5
2017-06-01 06:22:15 +02:00
|
98 | / for x in 0..10 { // never loops
99 | | match x {
100 | | 1 => break,
101 | | _ => return,
102 | | }
103 | | }
| |_____^
2017-10-09 00:26:39 +02:00
error: this loop never actually loops
--> $DIR/never_loop.rs:144:5
|
144 | / 'outer: while a { // never loops
145 | | while a {
146 | | if a {
147 | | a = false;
... |
151 | | break 'outer;
152 | | }
| |_____^
error: this loop never actually loops
--> $DIR/never_loop.rs:158:9
|
158 | / while false {
159 | | break 'label;
160 | | }
| |_________^
2018-01-16 17:06:27 +01:00
error: aborting due to 9 previous errors