Skip to content

Commit 349dfc7

Browse files
committed
Find original ast node before compute ref match in fn render
Signed-off-by: hi-rustin <[email protected]>
1 parent 8e4d9b8 commit 349dfc7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
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)