1 // `loop`s unconditionally-broken-from used to be allowed in constants, but are now forbidden by
2 // the HIR const-checker.
4 // See https://github.com/rust-lang/rust/pull/66170 and
5 // https://github.com/rust-lang/rust/issues/62272.
7 const FOO: () = loop { break; }; //~ ERROR `loop` is not allowed in a `const`
10 [FOO; { let x; loop { x = 5; break; } x }]; //~ ERROR `loop` is not allowed in a `const`