Use hir::GenericParam in ide_db::Definition instead of relisting all 3

This commit is contained in:
Lukas Wirth 2021-01-08 12:28:02 +01:00
parent 6a0a47dd14
commit b795128dde
9 changed files with 65 additions and 42 deletions

View file

@ -130,7 +130,10 @@ pub(crate) fn find_all_refs(
kind = ReferenceKind::FieldShorthandForLocal;
}
}
} else if matches!(def, Definition::LifetimeParam(_) | Definition::Label(_)) {
} else if matches!(
def,
Definition::GenericParam(hir::GenericParam::LifetimeParam(_)) | Definition::Label(_)
) {
kind = ReferenceKind::Lifetime;
};