diff options
author | Aleksey Kladov <[email protected]> | 2020-04-11 22:33:17 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-04-11 23:00:15 +0100 |
commit | 5e5eb6a108b00c573455d8d088742592012707be (patch) | |
tree | 49146b7e25835f21c09f75ec56e129367f56cab0 /crates/ra_hir_def/src | |
parent | 6b49e774e23c04a04ff5f377fc8dae25b5c69bb0 (diff) |
Align grammar for record patterns and literals
The grammar now looks like this
[name_ref :] pat
Diffstat (limited to 'crates/ra_hir_def/src')
-rw-r--r-- | crates/ra_hir_def/src/body/lower.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index c057dc8f2..6caa87db4 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs | |||
@@ -637,7 +637,7 @@ impl ExprCollector<'_> { | |||
637 | let iter = record_field_pat_list.record_field_pats().filter_map(|f| { | 637 | let iter = record_field_pat_list.record_field_pats().filter_map(|f| { |
638 | let ast_pat = f.pat()?; | 638 | let ast_pat = f.pat()?; |
639 | let pat = self.collect_pat(ast_pat); | 639 | let pat = self.collect_pat(ast_pat); |
640 | let name = f.name()?.as_name(); | 640 | let name = f.field_name()?.as_name(); |
641 | Some(RecordFieldPat { name, pat }) | 641 | Some(RecordFieldPat { name, pat }) |
642 | }); | 642 | }); |
643 | fields.extend(iter); | 643 | fields.extend(iter); |