From 6713f295e2cb03010145d213f3010eed61e7441f Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Mon, 20 Nov 2023 23:10:22 -0300 Subject: [PATCH] We should call eq instead of sup as we're relating Ty directly and not Binder --- compiler/rustc_hir_analysis/src/astconv/mod.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/compiler/rustc_hir_analysis/src/astconv/mod.rs b/compiler/rustc_hir_analysis/src/astconv/mod.rs index 102c83751aad7..ff92d4c4a3eeb 100644 --- a/compiler/rustc_hir_analysis/src/astconv/mod.rs +++ b/compiler/rustc_hir_analysis/src/astconv/mod.rs @@ -1674,10 +1674,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { let impl_ty = ocx.normalize(&cause, param_env, impl_ty); // Check that the self types can be related. - // FIXME(inherent_associated_types): Should we use `eq` here? Method probing uses - // `sup` for this situtation, too. What for? To constrain inference variables? - if ocx.sup(&ObligationCause::dummy(), param_env, impl_ty, self_ty).is_err() - { + if ocx.eq(&ObligationCause::dummy(), param_env, impl_ty, self_ty).is_err() { return false; }