Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide/src/references.rs')
-rw-r--r--crates/ide/src/references.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs
index 34286c4790..d85e01af41 100644
--- a/crates/ide/src/references.rs
+++ b/crates/ide/src/references.rs
@@ -121,8 +121,8 @@ pub struct FindAllRefsConfig<'a> {
/// - `;` after unit struct: Shows unit literal initializations
/// - Type name in definition: Shows all initialization usages
/// In these cases, other kinds of references (like type references) are filtered out.
-pub(crate) fn find_all_refs(
- sema: &Semantics<'_, RootDatabase>,
+pub(crate) fn find_all_refs<'db>(
+ sema: &Semantics<'db, RootDatabase>,
position: FilePosition,
config: &FindAllRefsConfig<'_>,
) -> Option<Vec<ReferenceSearchResult>> {
@@ -130,7 +130,7 @@ pub(crate) fn find_all_refs(
let syntax = sema.parse_guess_edition(position.file_id).syntax().clone();
let exclude_library_refs = !is_library_file(sema.db, position.file_id);
let make_searcher = |literal_search: bool| {
- move |def: Definition| {
+ move |def: Definition<'db>| {
let mut included_categories = ReferenceCategory::all();
if config.exclude_imports {
included_categories.remove(ReferenceCategory::IMPORT);
@@ -228,11 +228,11 @@ fn is_library_file(db: &RootDatabase, file_id: FileId) -> bool {
db.source_root(source_root).source_root(db).is_library
}
-pub(crate) fn find_defs(
- sema: &Semantics<'_, RootDatabase>,
+pub(crate) fn find_defs<'db>(
+ sema: &Semantics<'db, RootDatabase>,
syntax: &SyntaxNode,
offset: TextSize,
-) -> Option<Vec<Definition>> {
+) -> Option<Vec<Definition<'db>>> {
if let Some(token) = syntax.token_at_offset(offset).left_biased()
&& let Some(doc_comment) = token_as_doc_comment(&token)
{
@@ -304,7 +304,7 @@ pub(crate) fn find_defs(
/// Filter out all non-literal usages for adt-defs
fn retain_adt_literal_usages(
usages: &mut UsageSearchResult,
- def: Definition,
+ def: Definition<'_>,
sema: &Semantics<'_, RootDatabase>,
) {
let refs = usages.references.values_mut();