Getting close to getting rid of can_eq and tyty-cmp soon.
gcc/rust/ChangeLog:
* typecheck/rust-hir-path-probe.cc (PathProbeType::process_impl_item_candidate):
refactor to types_compatable
Signed-off-by: Philip Herron <herron.philip@googlemail.com>
if (!query_type (impl_ty_id, &impl_block_ty))
return;
- if (!receiver->can_eq (impl_block_ty, false))
- {
- if (!impl_block_ty->can_eq (receiver, false))
- return;
- }
+ if (!types_compatable (TyTy::TyWithLocation (receiver),
+ TyTy::TyWithLocation (impl_block_ty),
+ impl->get_locus (), false))
+ return;
// lets visit the impl_item
item->accept_vis (*this);