about summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-03-14 18:28:24 -0700
committerEsteban Küber <esteban@kuber.com.ar>2019-03-14 18:28:24 -0700
commit6cd6759cfcb9794dba4cc2a5a1fae6ae63706d12 (patch)
tree50b009048b030239d0682f41aa44b6298393ffff /src/libsyntax/parse
parent7486b9c208f7e1c4aa1e36961927327bd793e952 (diff)
downloadrust-6cd6759cfcb9794dba4cc2a5a1fae6ae63706d12.tar.gz
rust-6cd6759cfcb9794dba4cc2a5a1fae6ae63706d12.zip
Do not complain about unmentioned fields in recovered patterns
When the parser has to recover from malformed code in a pattern, do not
complain about missing fields.
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/parser.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index fe31311094b..a3894a33223 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -4698,7 +4698,7 @@ impl<'a> Parser<'a> {
                         let (fields, etc) = self.parse_pat_fields().unwrap_or_else(|mut e| {
                             e.emit();
                             self.recover_stmt();
-                            (vec![], false)
+                            (vec![], true)
                         });
                         self.bump();
                         pat = PatKind::Struct(path, fields, etc);