From: Philip Herron Date: Mon, 25 Aug 2025 19:52:29 +0000 (+0100) Subject: gccrs: Update can_eq to be a types_compatable interface X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b730dc66d976c498c9beb2e2bf292e1bd488bef;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/rust/typecheck/rust-hir-path-probe.cc b/gcc/rust/typecheck/rust-hir-path-probe.cc index bd42e906b4d..59118e6e685 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);