From f478853f425fc0207add653b48c49c937acaa94e Mon Sep 17 00:00:00 2001 From: Zachary S Date: Mon, 17 Mar 2025 00:25:15 -0500 Subject: If a label is placed on the block of a loop instead of the header, suggest moving it to the header. --- compiler/rustc_parse/src/parser/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_parse/src/parser/mod.rs') diff --git a/compiler/rustc_parse/src/parser/mod.rs b/compiler/rustc_parse/src/parser/mod.rs index 323c0c1d6d0..a79b4048288 100644 --- a/compiler/rustc_parse/src/parser/mod.rs +++ b/compiler/rustc_parse/src/parser/mod.rs @@ -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)), -- cgit 1.4.1-3-g733a5