From 5e5eb6a108b00c573455d8d088742592012707be Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 11 Apr 2020 23:33:17 +0200 Subject: Align grammar for record patterns and literals The grammar now looks like this [name_ref :] pat --- crates/ra_hir_def/src/body/lower.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_hir_def/src/body/lower.rs') 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<'_> { let iter = record_field_pat_list.record_field_pats().filter_map(|f| { let ast_pat = f.pat()?; let pat = self.collect_pat(ast_pat); - let name = f.name()?.as_name(); + let name = f.field_name()?.as_name(); Some(RecordFieldPat { name, pat }) }); fields.extend(iter); -- cgit v1.2.3