aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/references.rs
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-01-08 11:28:02 +0000
committerLukas Wirth <[email protected]>2021-01-10 11:33:47 +0000
commitb795128dde24cd3c4ec45879b354ec8c60fc751b (patch)
treee2898ec9ce50089f1ce269bc1ed34ad1a92fea51 /crates/ide/src/references.rs
parent6a0a47dd1492975959f6719202c3fb175df0349c (diff)
Use hir::GenericParam in ide_db::Definition instead of relisting all 3
Diffstat (limited to 'crates/ide/src/references.rs')
-rw-r--r--crates/ide/src/references.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs
index c95ed669c..0d5cd5f9a 100644
--- a/crates/ide/src/references.rs
+++ b/crates/ide/src/references.rs
@@ -130,7 +130,10 @@ pub(crate) fn find_all_refs(
130 kind = ReferenceKind::FieldShorthandForLocal; 130 kind = ReferenceKind::FieldShorthandForLocal;
131 } 131 }
132 } 132 }
133 } else if matches!(def, Definition::LifetimeParam(_) | Definition::Label(_)) { 133 } else if matches!(
134 def,
135 Definition::GenericParam(hir::GenericParam::LifetimeParam(_)) | Definition::Label(_)
136 ) {
134 kind = ReferenceKind::Lifetime; 137 kind = ReferenceKind::Lifetime;
135 }; 138 };
136 139