1
Fork 0

If a label is placed on the block of a loop instead of the header, suggest moving it to the header.

This commit is contained in:
Zachary S 2025-03-17 00:25:15 -05:00
parent 227690a258
commit f478853f42
7 changed files with 296 additions and 25 deletions

View file

@ -1374,7 +1374,7 @@ impl<'a> Parser<'a> {
self.psess.gated_spans.gate(sym::inline_const_pat, span);
}
self.expect_keyword(exp!(Const))?;
let (attrs, blk) = self.parse_inner_attrs_and_block()?;
let (attrs, blk) = self.parse_inner_attrs_and_block(None)?;
let anon_const = AnonConst {
id: DUMMY_NODE_ID,
value: self.mk_expr(blk.span, ExprKind::Block(blk, None)),