Merge #10215
10215: Use correct file syntax node for decl_access computation in find_all_refs r=Veykril a=Veykril Defs and refs of locals only ever life in one file, this isn't true for fields though. Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10201 bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
516eb40ba5
@ -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…
x
Reference in New Issue
Block a user