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:
Lukas Wirth 2022-08-23 14:29:59 +02:00
parent dea163970a
commit 6c5d15800e
5 changed files with 41 additions and 16 deletions

View file

@ -64,8 +64,11 @@ pub(crate) struct PathCompletionCtx {
pub(super) qualified: Qualified,
/// The parent of the path we are completing.
pub(super) parent: Option<ast::Path>,
#[allow(dead_code)]
/// The path of which we are completing the segment
pub(super) path: ast::Path,
/// The path of which we are completing the segment in the original file
pub(crate) original_path: Option<ast::Path>,
pub(super) kind: PathKind,
/// Whether the path segment has type args or not.
pub(super) has_type_args: bool,