Skip to content

Commit b4d652a

Browse files
committed
Auto merge of rust-lang#12830 - hi-rustin:rustin-patch-issue-12717-fix, r=Veykril
Find original ast node before compute ref match ref rust-lang/rust-analyzer#12717
2 parents cb32e26 + 349dfc7 commit b4d652a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/ide-completion/src/render/function.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ fn render(
8585
item.ref_match(ref_match, path_ctx.path.syntax().text_range().start());
8686
}
8787
FuncKind::Method(DotAccess { receiver: Some(receiver), .. }, _) => {
88-
item.ref_match(ref_match, receiver.syntax().text_range().start());
88+
if let Some(original_expr) = completion.sema.original_ast_node(receiver.clone()) {
89+
item.ref_match(ref_match, original_expr.syntax().text_range().start());
90+
}
8991
}
9092
_ => (),
9193
}

0 commit comments

Comments
 (0)