未验证 提交 04942105 编写于 作者: M Mazdak Farrokhzad 提交者: GitHub

Rollup merge of #60360 - rasendubi:const-labeled-break, r=Centril

Add test case for labeled break in const assignment

Fixes #51350.
// 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);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册