aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/method_resolution.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-31 19:47:00 +0100
committerGitHub <[email protected]>2021-05-31 19:47:00 +0100
commit42dfdb87cb748e65d2c87687bde4d4712f9a850b (patch)
tree7b3000a7b3b0ac22321177641b15463b81c1de66 /crates/hir_ty/src/method_resolution.rs
parenta127b10d0087c19c299ccfcb5b9f3af4615411f8 (diff)
parent759cb07891d6c9583095d7a1423619b36bc3d547 (diff)
Merge #9090
9090: hir_ty: use correct receiver_ty in method resolution r=cynecx a=cynecx Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8100. Co-authored-by: cynecx <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
-rw-r--r--crates/hir_ty/src/method_resolution.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs
index 08e385a42..af6b6cda7 100644
--- a/crates/hir_ty/src/method_resolution.rs
+++ b/crates/hir_ty/src/method_resolution.rs
@@ -721,7 +721,8 @@ fn iterate_inherent_methods(
721 cov_mark::hit!(impl_self_type_match_without_receiver); 721 cov_mark::hit!(impl_self_type_match_without_receiver);
722 continue; 722 continue;
723 } 723 }
724 if callback(&self_ty.value, item) { 724 let receiver_ty = receiver_ty.map(|x| &x.value).unwrap_or(&self_ty.value);
725 if callback(receiver_ty, item) {
725 return true; 726 return true;
726 } 727 }
727 } 728 }