aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-04-11 23:01:22 +0100
committerGitHub <[email protected]>2020-04-11 23:01:22 +0100
commita8e032820f14cad3630299a1ae16c62dcf59f358 (patch)
tree4438f81bdbf88d694b14c3c448c5bb21c8541091 /crates/ra_hir_def
parentf13da3f895d9d401ff467a6c1fa33a4adf09fe2c (diff)
parent5e5eb6a108b00c573455d8d088742592012707be (diff)
Merge #3955
3955: Align grammar for record patterns and literals r=matklad a=matklad The grammar now looks like this [name_ref :] pat bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir_def')
-rw-r--r--crates/ra_hir_def/src/body/lower.rs2
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);