Add test case for labeled break in const assignment

See https://github.com/rust-lang/rust/issues/51350 for more information.
This commit is contained in:
Alexey Shmalko 2019-04-28 23:12:35 +03:00
parent 012c300706
commit 7cafacdd82
No known key found for this signature in database
GPG Key ID: DCEF7BCCEB3066C3

View File

@ -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);
}