Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit f669b55

Browse files
committed
Use adjusted type
1 parent 7db40dd commit f669b55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/rust-analyzer/crates/ide/src/goto_definition.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ fn find_from_definition(
144144
// - return_type is B (type of b)
145145
// We will find the definition of B::from(a: A).
146146
let method_call = ast::MethodCallExpr::cast(original_token.parent()?.parent()?)?;
147-
let receiver_type = sema.type_of_expr(&method_call.receiver()?)?.original();
147+
let receiver_type = sema.type_of_expr(&method_call.receiver()?)?.adjusted();
148148
let return_type = sema.type_of_expr(&method_call.clone().into())?.original();
149149

150150
let (search_method, search_trait, return_type) = match method_call.name_ref()?.text().as_str() {

0 commit comments

Comments
 (0)