Skip to content

Commit

Permalink
Add test case for labeled break in const assignment
Browse files Browse the repository at this point in the history
See #51350 for more information.
  • Loading branch information
rasendubi committed Apr 28, 2019
1 parent 012c300 commit 7cafacd
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 7cafacd

Please sign in to comment.