mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +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
@ -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 New Issue
Block a user