Skip to content

Commit

Permalink
Use adjusted type
Browse files Browse the repository at this point in the history
  • Loading branch information
1hakusai1 committed Jan 15, 2025
1 parent dc075fd commit 65342f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ide/src/goto_definition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ fn find_from_definition(
// - return_type is B (type of b)
// We will find the definition of B::from(a: A).
let method_call = ast::MethodCallExpr::cast(original_token.parent()?.parent()?)?;
let receiver_type = sema.type_of_expr(&method_call.receiver()?)?.original();
let receiver_type = sema.type_of_expr(&method_call.receiver()?)?.adjusted();
let return_type = sema.type_of_expr(&method_call.clone().into())?.original();

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

0 comments on commit 65342f4

Please sign in to comment.