mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 05:53:45 +00:00
Find original as node before compute ref match
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
This commit is contained in:
parent
8e379cec62
commit
15016bc09f
1 changed files with 4 additions and 2 deletions
|
@ -134,8 +134,10 @@ pub(crate) fn render_field(
|
|||
.lookup_by(name.clone());
|
||||
item.insert_text(escaped_name);
|
||||
if let Some(receiver) = &dot_access.receiver {
|
||||
if let Some(ref_match) = compute_ref_match(ctx.completion, ty) {
|
||||
item.ref_match(ref_match, receiver.syntax().text_range().start());
|
||||
if let Some(original) = ctx.completion.sema.original_ast_node(receiver.clone()) {
|
||||
if let Some(ref_match) = compute_ref_match(ctx.completion, ty) {
|
||||
item.ref_match(ref_match, original.syntax().text_range().start());
|
||||
}
|
||||
}
|
||||
}
|
||||
item.build()
|
||||
|
|
Loading…
Reference in a new issue