mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
fix: Fix search for associated trait items being inconsistent
This commit is contained in:
parent
84544134f6
commit
bb4bfae422
4 changed files with 125 additions and 43 deletions
|
@ -73,6 +73,7 @@ pub(crate) fn find_all_refs(
|
|||
});
|
||||
let mut usages =
|
||||
def.usages(sema).set_scope(search_scope.clone()).include_self_refs().all();
|
||||
|
||||
if literal_search {
|
||||
retain_adt_literal_usages(&mut usages, def, sema);
|
||||
}
|
||||
|
@ -105,7 +106,7 @@ pub(crate) fn find_all_refs(
|
|||
}
|
||||
None => {
|
||||
let search = make_searcher(false);
|
||||
Some(find_defs(sema, &syntax, position.offset)?.into_iter().map(search).collect())
|
||||
Some(find_defs(sema, &syntax, position.offset)?.map(search).collect())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue