https://gcc.gnu.org/g:9b730dc66d976c498c9beb2e2bf292e1bd488bef
commit r16-4831-g9b730dc66d976c498c9beb2e2bf292e1bd488bef Author: Philip Herron <[email protected]> Date: Mon Aug 25 20:52:29 2025 +0100 gccrs: Update can_eq to be a types_compatable interface 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 <[email protected]> Diff: --- gcc/rust/typecheck/rust-hir-path-probe.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gcc/rust/typecheck/rust-hir-path-probe.cc b/gcc/rust/typecheck/rust-hir-path-probe.cc index bd42e906b4d8..59118e6e685e 100644 --- a/gcc/rust/typecheck/rust-hir-path-probe.cc +++ b/gcc/rust/typecheck/rust-hir-path-probe.cc @@ -302,11 +302,10 @@ PathProbeType::process_impl_item_candidate (HirId id, HIR::ImplItem *item, 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);
