Skip to content

Commit 0494210

Browse files
authored
Rollup merge of #60360 - rasendubi:const-labeled-break, r=Centril
Add test case for labeled break in const assignment Fixes #51350.
2 parents 4369f03 + 7cafacd commit 0494210

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)