diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-10 15:19:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-10 15:19:29 +0200 |
| commit | a0c78871996bfffbfb43a34518cb69d1fc1eddf6 (patch) | |
| tree | 66058f9cd20bb2382fc06ba55238ef4b6be484d6 /compiler/rustc_parse/src/parser | |
| parent | 119574f83576dc1f3ae067f9a97986d4e2b0826c (diff) | |
| parent | 4dc954f88256314c4c03a4cb43eee838bc3762eb (diff) | |
| download | rust-a0c78871996bfffbfb43a34518cb69d1fc1eddf6.tar.gz rust-a0c78871996bfffbfb43a34518cb69d1fc1eddf6.zip | |
Rollup merge of #136906 - chenyukang:yukang-fix-136741-closure-body, r=oli-obk
Add checking for unnecessary delims in closure body Fixes #136741
Diffstat (limited to 'compiler/rustc_parse/src/parser')
| -rw-r--r-- | compiler/rustc_parse/src/parser/item.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 9ed7124a11c..d6cc98d505c 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -2206,7 +2206,7 @@ impl<'a> Parser<'a> { if self.look_ahead(1, |t| *t == token::Bang) && self.look_ahead(2, |t| t.is_ident()) { return IsMacroRulesItem::Yes { has_bang: true }; - } else if self.look_ahead(1, |t| (t.is_ident())) { + } else if self.look_ahead(1, |t| t.is_ident()) { // macro_rules foo self.dcx().emit_err(errors::MacroRulesMissingBang { span: macro_rules_span, |
