mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
fix: Fix reference autocompletions using incorrect offsets in macro inputs
Fixes https://github.com/rust-lang/rust-analyzer/issues/13035
This commit is contained in:
parent
dea163970a
commit
6c5d15800e
5 changed files with 41 additions and 16 deletions
|
@ -588,12 +588,15 @@ impl<'a> CompletionContext<'a> {
|
|||
};
|
||||
|
||||
let path = segment.parent_path();
|
||||
let original_path = find_node_in_file_compensated(sema, original_file, &path);
|
||||
|
||||
let mut path_ctx = PathCompletionCtx {
|
||||
has_call_parens: false,
|
||||
has_macro_bang: false,
|
||||
qualified: Qualified::No,
|
||||
parent: None,
|
||||
path: path.clone(),
|
||||
original_path,
|
||||
kind: PathKind::Item { kind: ItemListKind::SourceFile },
|
||||
has_type_args: false,
|
||||
use_tree_parent: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue