mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
Use correct file syntax node for decl_access computation in find_all_refs
This commit is contained in:
parent
3e056b9e90
commit
95746a99b4
@ -87,7 +87,10 @@ pub(crate) fn find_all_refs(
|
||||
}
|
||||
.map(|nav| {
|
||||
let decl_range = nav.focus_or_full_range();
|
||||
Declaration { nav, access: decl_access(&def, &syntax, decl_range) }
|
||||
Declaration {
|
||||
access: decl_access(&def, sema.parse(nav.file_id).syntax(), decl_range),
|
||||
nav,
|
||||
}
|
||||
});
|
||||
if is_literal_search {
|
||||
retain_adt_literal_usages(&mut usages, def, sema);
|
||||
|
Loading…
Reference in New Issue
Block a user