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:
parent
012c300706
commit
7cafacdd82
10
src/test/run-pass/consts/const-labeled-break.rs
Normal file
10
src/test/run-pass/consts/const-labeled-break.rs
Normal 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user