We should call eq instead of sup as we're relating Ty directly and not Binder<TraitRef>

This commit is contained in:
Santiago Pastorino 2023-11-20 23:10:22 -03:00
parent f74f700952
commit 6713f295e2
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF

View File

@ -1674,10 +1674,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
let impl_ty = ocx.normalize(&cause, param_env, impl_ty); let impl_ty = ocx.normalize(&cause, param_env, impl_ty);
// Check that the self types can be related. // Check that the self types can be related.
// FIXME(inherent_associated_types): Should we use `eq` here? Method probing uses if ocx.eq(&ObligationCause::dummy(), param_env, impl_ty, self_ty).is_err() {
// `sup` for this situtation, too. What for? To constrain inference variables?
if ocx.sup(&ObligationCause::dummy(), param_env, impl_ty, self_ty).is_err()
{
return false; return false;
} }