From 44fd3b4d4648c9ea2dfa052fe5d3dbb2dfb4f492 Mon Sep 17 00:00:00 2001 From: Esteban Küber Date: Mon, 6 Nov 2023 21:00:13 +0000 Subject: Make `parse_pat_ident` not recover bad name --- compiler/rustc_parse/src/parser/pat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_parse/src/parser') diff --git a/compiler/rustc_parse/src/parser/pat.rs b/compiler/rustc_parse/src/parser/pat.rs index b05868e235a..ff36ac952ad 100644 --- a/compiler/rustc_parse/src/parser/pat.rs +++ b/compiler/rustc_parse/src/parser/pat.rs @@ -839,7 +839,7 @@ impl<'a> Parser<'a> { binding_annotation: BindingAnnotation, syntax_loc: Option, ) -> PResult<'a, PatKind> { - let ident = self.parse_ident()?; + let ident = self.parse_ident_common(false)?; if self.may_recover() && !matches!(syntax_loc, Some(PatternLocation::FunctionParameter)) -- cgit 1.4.1-3-g733a5