diff options
author | Lukas Wirth <[email protected]> | 2021-01-08 11:28:02 +0000 |
---|---|---|
committer | Lukas Wirth <[email protected]> | 2021-01-10 11:33:47 +0000 |
commit | b795128dde24cd3c4ec45879b354ec8c60fc751b (patch) | |
tree | e2898ec9ce50089f1ce269bc1ed34ad1a92fea51 /crates/ide/src/references.rs | |
parent | 6a0a47dd1492975959f6719202c3fb175df0349c (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.rs | 5 |
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 | ||