Skip to content

Commit

Permalink
Unrolled build for rust-lang#118262
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#118262 - spastorino:relate-iats-using-eq, r=compiler-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 rust-lang#118118 but unrelated to that PR.

r? `@compiler-errors` `@lcnr`
  • Loading branch information
rust-timer authored Nov 25, 2023
2 parents fad6bb8 + 6713f29 commit d6f5552
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 d6f5552

Please sign in to comment.