diff options
Diffstat (limited to 'crates/ide_db/src')
-rw-r--r-- | crates/ide_db/src/defs.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide_db/src/defs.rs b/crates/ide_db/src/defs.rs index 0d0affc27..f8c7aa491 100644 --- a/crates/ide_db/src/defs.rs +++ b/crates/ide_db/src/defs.rs | |||
@@ -157,9 +157,9 @@ pub fn classify_name(sema: &Semantics<RootDatabase>, name: &ast::Name) -> Option | |||
157 | ast::IdentPat(it) => { | 157 | ast::IdentPat(it) => { |
158 | let local = sema.to_def(&it)?; | 158 | let local = sema.to_def(&it)?; |
159 | 159 | ||
160 | if let Some(record_field_pat) = it.syntax().parent().and_then(ast::RecordPatField::cast) { | 160 | if let Some(record_pat_field) = it.syntax().parent().and_then(ast::RecordPatField::cast) { |
161 | if record_field_pat.name_ref().is_none() { | 161 | if record_pat_field.name_ref().is_none() { |
162 | if let Some(field) = sema.resolve_record_field_pat(&record_field_pat) { | 162 | if let Some(field) = sema.resolve_record_pat_field(&record_pat_field) { |
163 | let field = Definition::Field(field); | 163 | let field = Definition::Field(field); |
164 | return Some(NameClass::FieldShorthand { local, field }); | 164 | return Some(NameClass::FieldShorthand { local, field }); |
165 | } | 165 | } |
@@ -275,8 +275,8 @@ pub fn classify_name_ref( | |||
275 | } | 275 | } |
276 | } | 276 | } |
277 | 277 | ||
278 | if let Some(record_field_pat) = ast::RecordPatField::cast(parent.clone()) { | 278 | if let Some(record_pat_field) = ast::RecordPatField::cast(parent.clone()) { |
279 | if let Some(field) = sema.resolve_record_field_pat(&record_field_pat) { | 279 | if let Some(field) = sema.resolve_record_pat_field(&record_pat_field) { |
280 | let field = Definition::Field(field); | 280 | let field = Definition::Field(field); |
281 | return Some(NameRefClass::Definition(field)); | 281 | return Some(NameRefClass::Definition(field)); |
282 | } | 282 | } |