aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_db/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-31 18:54:16 +0100
committerAleksey Kladov <[email protected]>2020-07-31 19:00:48 +0100
commit14cb96ec0e6be3b99bfe4ea373c058dcbd2a4f79 (patch)
tree730802ad5c2d522bd77eba81984d8e368e852948 /crates/ra_ide_db/src
parent572f1c08b6ba43bdd57c5cb99f79a08ecd821c1c (diff)
Allign RecordPat with RecordExpr
Diffstat (limited to 'crates/ra_ide_db/src')
-rw-r--r--crates/ra_ide_db/src/defs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs
index df56f2d9e..6bf80a34c 100644
--- a/crates/ra_ide_db/src/defs.rs
+++ b/crates/ra_ide_db/src/defs.rs
@@ -131,7 +131,7 @@ pub fn classify_name(sema: &Semantics<RootDatabase>, name: &ast::Name) -> Option
131 ast::BindPat(it) => { 131 ast::BindPat(it) => {
132 let local = sema.to_def(&it)?; 132 let local = sema.to_def(&it)?;
133 133
134 if let Some(record_field_pat) = it.syntax().parent().and_then(ast::RecordFieldPat::cast) { 134 if let Some(record_field_pat) = it.syntax().parent().and_then(ast::RecordPatField::cast) {
135 if record_field_pat.name_ref().is_none() { 135 if record_field_pat.name_ref().is_none() {
136 if let Some(field) = sema.resolve_record_field_pat(&record_field_pat) { 136 if let Some(field) = sema.resolve_record_field_pat(&record_field_pat) {
137 let field = Definition::Field(field); 137 let field = Definition::Field(field);
@@ -247,7 +247,7 @@ pub fn classify_name_ref(
247 } 247 }
248 } 248 }
249 249
250 if let Some(record_field_pat) = ast::RecordFieldPat::cast(parent.clone()) { 250 if let Some(record_field_pat) = ast::RecordPatField::cast(parent.clone()) {
251 if let Some(field) = sema.resolve_record_field_pat(&record_field_pat) { 251 if let Some(field) = sema.resolve_record_field_pat(&record_field_pat) {
252 let field = Definition::Field(field); 252 let field = Definition::Field(field);
253 return Some(NameRefClass::Definition(field)); 253 return Some(NameRefClass::Definition(field));