Skip to content

Commit

Permalink
Rollup merge of #118262 - spastorino:relate-iats-using-eq, r=compiler…
Browse files Browse the repository at this point in the history
…-errors

Relate Inherent Associated Types using eq

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

This is part of #118118 but unrelated to that PR.

r? `@compiler-errors` `@lcnr`
  • Loading branch information
fmease authored Nov 25, 2023
2 parents 7c2244a + 6713f29 commit 23461fd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/rustc_hir_analysis/src/astconv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 23461fd

Please sign in to comment.