]> git.proxmox.com Git - rustc.git/blobdiff - 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
index 7cdbb22f9245960bcdf243e676c9c7c14a1a7da6..45e3cf438888e64344cd353c8e17054d09416e9d 100644 (file)
@@ -1,10 +1,12 @@
-// build-pass
-
 // 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.
+//
+// It is now forbidden by the HIR const-checker.
+//
+// See https://github.com/rust-lang/rust/pull/66170.
 
-const CRASH: () = 'a: while break 'a {};
+const CRASH: () = 'a: while break 'a {}; //~ ERROR `while` is not allowed in a `const`
 
 fn main() {}