Skip to content

Commit d05146f

Browse files
committed
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]>
1 parent 567b404 commit d05146f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

gcc/rust/typecheck/rust-hir-path-probe.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,10 @@ PathProbeType::process_impl_item_candidate (HirId id, HIR::ImplItem *item,
302302
if (!query_type (impl_ty_id, &impl_block_ty))
303303
return;
304304

305-
if (!receiver->can_eq (impl_block_ty, false))
306-
{
307-
if (!impl_block_ty->can_eq (receiver, false))
308-
return;
309-
}
305+
if (!types_compatable (TyTy::TyWithLocation (receiver),
306+
TyTy::TyWithLocation (impl_block_ty),
307+
impl->get_locus (), false))
308+
return;
310309

311310
// lets visit the impl_item
312311
item->accept_vis (*this);

0 commit comments

Comments
 (0)