Skip to content

Commit 7cafacd

Browse files
committed
Add test case for labeled break in const assignment
See #51350 for more information.
1 parent 012c300 commit 7cafacd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Using labeled break in a while loop has caused an illegal instruction being
2+
// generated, and an ICE later.
3+
//
4+
// See https://github.com/rust-lang/rust/issues/51350 for more information.
5+
6+
const CRASH: () = 'a: while break 'a {};
7+
8+
fn main() {
9+
println!("{:?}", CRASH);
10+
}

0 commit comments

Comments
 (0)