diff --git a/src/test/run-pass/consts/const-labeled-break.rs b/src/test/run-pass/consts/const-labeled-break.rs new file mode 100644 index 0000000000000000000000000000000000000000..9417159e6fb7825c111cbaefe968f1aa9137bef5 --- /dev/null +++ b/src/test/run-pass/consts/const-labeled-break.rs @@ -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); +}