diff options
Diffstat (limited to 'crates/ra_ide_db/src')
-rw-r--r-- | crates/ra_ide_db/src/defs.rs | 4 |
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)); |