diff options
Diffstat (limited to 'crates/ide_db/src/search.rs')
-rw-r--r-- | crates/ide_db/src/search.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_db/src/search.rs b/crates/ide_db/src/search.rs index 43b8560ca..8048aa621 100644 --- a/crates/ide_db/src/search.rs +++ b/crates/ide_db/src/search.rs | |||
@@ -314,9 +314,9 @@ impl<'a> FindUsages<'a> { | |||
314 | 314 | ||
315 | fn found_name(&self, name: &ast::Name, sink: &mut dyn FnMut(Reference) -> bool) -> bool { | 315 | fn found_name(&self, name: &ast::Name, sink: &mut dyn FnMut(Reference) -> bool) -> bool { |
316 | match classify_name(self.sema, name) { | 316 | match classify_name(self.sema, name) { |
317 | Some(NameClass::PatFieldShorthand { local: _, field }) => { | 317 | Some(NameClass::PatFieldShorthand { local_def: _, field_ref }) => { |
318 | let reference = match self.def { | 318 | let reference = match self.def { |
319 | Definition::Field(_) if &field == self.def => Reference { | 319 | Definition::Field(_) if &field_ref == self.def => Reference { |
320 | file_range: self.sema.original_range(name.syntax()), | 320 | file_range: self.sema.original_range(name.syntax()), |
321 | kind: ReferenceKind::FieldShorthandForField, | 321 | kind: ReferenceKind::FieldShorthandForField, |
322 | // FIXME: mutable patterns should have `Write` access | 322 | // FIXME: mutable patterns should have `Write` access |