Skip to content

Commit 4869a23

Browse files
committed
Add troublesome statement with semi-colon to teset
1 parent 40d7164 commit 4869a23

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/test/ui/while-label-break-condition.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(unreachable_code)]
12+
1113
fn main() {
1214
'a: while break 'a {} //~ ERROR: use of undeclared label
15+
'b: while break 'b {}; //~ ERROR: use of undeclared label
1316
}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
error[E0426]: use of undeclared label `'a`
2-
--> $DIR/while-label-break-condition.rs:12:21
2+
--> $DIR/while-label-break-condition.rs:14:21
33
|
44
LL | 'a: while break 'a {} //~ ERROR: use of undeclared label
55
| ^^ undeclared label `'a`
66

7-
error: aborting due to previous error
7+
error[E0426]: use of undeclared label `'b`
8+
--> $DIR/while-label-break-condition.rs:15:21
9+
|
10+
LL | 'b: while break 'b {}; //~ ERROR: use of undeclared label
11+
| ^^ undeclared label `'b`
12+
13+
error: aborting due to 2 previous errors
814

915
For more information about this error, try `rustc --explain E0426`.

0 commit comments

Comments
 (0)