mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-31 15:47:31 +00:00
Find original ast node before compute ref match in fn render
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
This commit is contained in:
parent
8e4d9b84fe
commit
349dfc7e95
1 changed files with 3 additions and 1 deletions
|
@ -85,7 +85,9 @@ fn render(
|
|||
item.ref_match(ref_match, path_ctx.path.syntax().text_range().start());
|
||||
}
|
||||
FuncKind::Method(DotAccess { receiver: Some(receiver), .. }, _) => {
|
||||
item.ref_match(ref_match, receiver.syntax().text_range().start());
|
||||
if let Some(original_expr) = completion.sema.original_ast_node(receiver.clone()) {
|
||||
item.ref_match(ref_match, original_expr.syntax().text_range().start());
|
||||
}
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue