about summary refs log tree commit diff
path: root/compiler/rustc_parse/src
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2023-11-06 21:00:13 +0000
committerEsteban Küber <esteban@kuber.com.ar>2023-11-29 18:47:31 +0000
commit44fd3b4d4648c9ea2dfa052fe5d3dbb2dfb4f492 (patch)
tree0959d6ed609e1c2ba652f7a25b4166e491bcf908 /compiler/rustc_parse/src
parentabe34e9ab14c0a194152b4f9acc3dcbb000f3e98 (diff)
downloadrust-44fd3b4d4648c9ea2dfa052fe5d3dbb2dfb4f492.tar.gz
rust-44fd3b4d4648c9ea2dfa052fe5d3dbb2dfb4f492.zip
Make `parse_pat_ident` not recover bad name
Diffstat (limited to 'compiler/rustc_parse/src')
-rw-r--r--compiler/rustc_parse/src/parser/pat.rs2
1 files changed, 1 insertions, 1 deletions
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<PatternLocation>,
     ) -> 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))