Skip to content

Commit

Permalink
Rollup merge of #60360 - rasendubi:const-labeled-break, r=Centril
Browse files Browse the repository at this point in the history
Add test case for labeled break in const assignment

Fixes #51350.
  • Loading branch information
Centril authored Apr 29, 2019
2 parents 4369f03 + 7cafacd commit 0494210
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/run-pass/consts/const-labeled-break.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Using labeled break in a while loop has caused an illegal instruction being
// generated, and an ICE later.
//
// See https://github.com/rust-lang/rust/issues/51350 for more information.

const CRASH: () = 'a: while break 'a {};

fn main() {
println!("{:?}", CRASH);
}

0 comments on commit 0494210

Please sign in to comment.