mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
hir_ty: use correct receiver_ty in method resolution
This commit is contained in:
parent
7c1d8ca635
commit
759cb07891
3 changed files with 82 additions and 12 deletions
|
@ -721,7 +721,8 @@ fn iterate_inherent_methods(
|
|||
cov_mark::hit!(impl_self_type_match_without_receiver);
|
||||
continue;
|
||||
}
|
||||
if callback(&self_ty.value, item) {
|
||||
let receiver_ty = receiver_ty.map(|x| &x.value).unwrap_or(&self_ty.value);
|
||||
if callback(receiver_ty, item) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue