rust/tests/ui/never_loop.stderr

95 lines
2.0 KiB
Plaintext
Raw Normal View History

error: this loop never actually loops
2018-10-06 16:18:06 +00:00
--> $DIR/never_loop.rs:17:5
|
2018-10-06 16:18:06 +00:00
17 | / loop { // clippy::never_loop
18 | | x += 1;
19 | | if x == 1 {
20 | | return
21 | | }
22 | | break;
23 | | }
| |_____^
|
= note: #[deny(clippy::never_loop)] on by default
error: this loop never actually loops
2018-10-06 16:18:06 +00:00
--> $DIR/never_loop.rs:38:5
|
2018-10-06 16:18:06 +00:00
38 | / loop { // never loops
39 | | x += 1;
40 | | break
41 | | }
| |_____^
2017-06-01 04:22:15 +00:00
error: this loop never actually loops
2018-10-06 16:18:06 +00:00
--> $DIR/never_loop.rs:57:2
2017-06-01 04:22:15 +00:00
|
2018-10-06 16:18:06 +00:00
57 | loop { // never loops
| _____^
2018-10-06 16:18:06 +00:00
58 | | while i == 0 { // never loops
59 | | break
60 | | }
61 | | return
62 | | }
| |_____^
2017-06-01 04:22:15 +00:00
error: this loop never actually loops
2018-10-06 16:18:06 +00:00
--> $DIR/never_loop.rs:58:9
2017-06-01 04:22:15 +00:00
|
2018-10-06 16:18:06 +00:00
58 | / while i == 0 { // never loops
59 | | break
60 | | }
2017-06-01 04:22:15 +00:00
| |_________^
error: this loop never actually loops
2018-10-06 16:18:06 +00:00
--> $DIR/never_loop.rs:69:3
2017-06-01 04:22:15 +00:00
|
2018-10-06 16:18:06 +00:00
69 | loop { // never loops
| _________^
2018-10-06 16:18:06 +00:00
70 | | if x == 5 { break }
71 | | continue 'outer
72 | | }
| |_________^
2017-06-01 04:22:15 +00:00
error: this loop never actually loops
2018-10-06 16:18:06 +00:00
--> $DIR/never_loop.rs:102:5
|
102 | / while let Some(y) = x { // never loops
103 | | return
104 | | }
| |_____^
2017-06-01 04:22:15 +00:00
error: this loop never actually loops
2018-10-06 16:18:06 +00:00
--> $DIR/never_loop.rs:108:5
2017-06-01 04:22:15 +00:00
|
2018-10-06 16:18:06 +00:00
108 | / for x in 0..10 { // never loops
109 | | match x {
110 | | 1 => break,
111 | | _ => return,
112 | | }
113 | | }
2017-06-01 04:22:15 +00:00
| |_____^
2017-10-08 22:26:39 +00:00
error: this loop never actually loops
2018-10-06 16:18:06 +00:00
--> $DIR/never_loop.rs:154:5
2017-10-08 22:26:39 +00:00
|
2018-10-06 16:18:06 +00:00
154 | / 'outer: while a { // never loops
155 | | while a {
156 | | if a {
157 | | a = false;
2017-10-08 22:26:39 +00:00
... |
2018-10-06 16:18:06 +00:00
161 | | break 'outer;
162 | | }
2017-10-08 22:26:39 +00:00
| |_____^
error: this loop never actually loops
2018-10-06 16:18:06 +00:00
--> $DIR/never_loop.rs:168:9
|
2018-10-06 16:18:06 +00:00
168 | / while false {
169 | | break 'label;
170 | | }
| |_________^
2018-01-16 16:06:27 +00:00
error: aborting due to 9 previous errors