aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/references.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/references.rs')
-rw-r--r--crates/ra_ide/src/references.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs
index c215040f4..a6320bd2f 100644
--- a/crates/ra_ide/src/references.rs
+++ b/crates/ra_ide/src/references.rs
@@ -127,9 +127,8 @@ pub(crate) fn find_all_refs(
127 127
128 let declaration = match def.kind { 128 let declaration = match def.kind {
129 NameKind::Macro(mac) => mac.to_nav(db), 129 NameKind::Macro(mac) => mac.to_nav(db),
130 NameKind::Field(field) => field.to_nav(db), 130 NameKind::StructField(field) => field.to_nav(db),
131 NameKind::AssocItem(assoc) => assoc.to_nav(db), 131 NameKind::ModuleDef(def) => NavigationTarget::from_def(db, def)?,
132 NameKind::Def(def) => NavigationTarget::from_def(db, def)?,
133 NameKind::SelfType(imp) => imp.to_nav(db), 132 NameKind::SelfType(imp) => imp.to_nav(db),
134 NameKind::Local(local) => local.to_nav(db), 133 NameKind::Local(local) => local.to_nav(db),
135 NameKind::TypeParam(_) => return None, 134 NameKind::TypeParam(_) => return None,
@@ -240,7 +239,7 @@ fn decl_access(
240 range: TextRange, 239 range: TextRange,
241) -> Option<ReferenceAccess> { 240) -> Option<ReferenceAccess> {
242 match kind { 241 match kind {
243 NameKind::Local(_) | NameKind::Field(_) => {} 242 NameKind::Local(_) | NameKind::StructField(_) => {}
244 _ => return None, 243 _ => return None,
245 }; 244 };
246 245
@@ -260,7 +259,7 @@ fn decl_access(
260fn reference_access(kind: &NameKind, name_ref: &ast::NameRef) -> Option<ReferenceAccess> { 259fn reference_access(kind: &NameKind, name_ref: &ast::NameRef) -> Option<ReferenceAccess> {
261 // Only Locals and Fields have accesses for now. 260 // Only Locals and Fields have accesses for now.
262 match kind { 261 match kind {
263 NameKind::Local(_) | NameKind::Field(_) => {} 262 NameKind::Local(_) | NameKind::StructField(_) => {}
264 _ => return None, 263 _ => return None,
265 }; 264 };
266 265