]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/const-labeled-break.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / consts / const-labeled-break.rs
1 // Using labeled break in a while loop has caused an illegal instruction being
2 // generated, and an ICE later.
3 //
4 // See https://github.com/rust-lang/rust/issues/51350 for more information.
5 //
6 // It is now forbidden by the HIR const-checker.
7 //
8 // See https://github.com/rust-lang/rust/pull/66170.
9
10 const CRASH: () = 'a: while break 'a {}; //~ ERROR `while` is not allowed in a `const`
11
12 fn main() {}