diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-03-28 08:43:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-28 08:43:32 +0100 |
| commit | dcd531ea15252725ad2858b7b0f9c0a0882ff536 (patch) | |
| tree | 3209ea4d9e1f3324ffd5ebd8b4ccd79e634c3e8a /src/libsyntax/parse | |
| parent | 20f063a9398ea3966947577059aa1ba60b6b8e0a (diff) | |
| parent | 6cd6759cfcb9794dba4cc2a5a1fae6ae63706d12 (diff) | |
| download | rust-dcd531ea15252725ad2858b7b0f9c0a0882ff536.tar.gz rust-dcd531ea15252725ad2858b7b0f9c0a0882ff536.zip | |
Rollup merge of #59198 - estebank:recovered-pattern, r=zackmdavis
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. Fix #59145.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index d3eadfeceb2..79c1f0cb4cc 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -4734,7 +4734,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); |
