diff options
Diffstat (limited to 'crates/ide_db/src')
-rw-r--r-- | crates/ide_db/src/search.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ide_db/src/search.rs b/crates/ide_db/src/search.rs index 8bfbba4bb..a840e06a6 100644 --- a/crates/ide_db/src/search.rs +++ b/crates/ide_db/src/search.rs | |||
@@ -490,9 +490,7 @@ impl<'a> FindUsages<'a> { | |||
490 | Some(NameRefClass::FieldShorthand { local_ref: local, field_ref: field }) => { | 490 | Some(NameRefClass::FieldShorthand { local_ref: local, field_ref: field }) => { |
491 | let FileRange { file_id, range } = self.sema.original_range(name_ref.syntax()); | 491 | let FileRange { file_id, range } = self.sema.original_range(name_ref.syntax()); |
492 | let access = match self.def { | 492 | let access = match self.def { |
493 | Definition::Field(_) if field == self.def => { | 493 | Definition::Field(_) if field == self.def => reference_access(&field, name_ref), |
494 | reference_access(&field, name_ref) | ||
495 | } | ||
496 | Definition::Local(l) if local == l => { | 494 | Definition::Local(l) if local == l => { |
497 | reference_access(&Definition::Local(local), name_ref) | 495 | reference_access(&Definition::Local(local), name_ref) |
498 | } | 496 | } |