diff options
author | Pavan Kumar Sunkara <[email protected]> | 2020-09-05 02:06:05 +0100 |
---|---|---|
committer | Pavan Kumar Sunkara <[email protected]> | 2020-09-10 17:56:04 +0100 |
commit | 4d97f5f037c1b061215d4b0fb32d48a1b8be836f (patch) | |
tree | b0be5ddcce7c64a5aedc0661c208b7f0e611564e /crates/ide_db/src | |
parent | 5c336e266fe09ae9ae6e634513d441cbcde63696 (diff) |
Rename record_field_pat to record_pat_field
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 | } |