diff options
| author | 1hakusai1 <1hakusai1@gmail.com> | 2025-01-15 21:04:19 +0900 |
|---|---|---|
| committer | 1hakusai1 <1hakusai1@gmail.com> | 2025-01-15 21:04:19 +0900 |
| commit | f669b55b186594585aa34ef6365e8acfa3554444 (patch) | |
| tree | d5d16fed227b2dbaa7f9a1a873ecfb22efd7bb7e | |
| parent | 7db40dd630da064aa8a21af806fefdf6ece140e1 (diff) | |
| download | rust-f669b55b186594585aa34ef6365e8acfa3554444.tar.gz rust-f669b55b186594585aa34ef6365e8acfa3554444.zip | |
Use adjusted type
| -rw-r--r-- | src/tools/rust-analyzer/crates/ide/src/goto_definition.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/ide/src/goto_definition.rs b/src/tools/rust-analyzer/crates/ide/src/goto_definition.rs index 6c9a1ffe06d..d023e6cbc0c 100644 --- a/src/tools/rust-analyzer/crates/ide/src/goto_definition.rs +++ b/src/tools/rust-analyzer/crates/ide/src/goto_definition.rs @@ -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() { |
