aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/method_resolution.rs
diff options
context:
space:
mode:
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 }