Skip to content

Commit

Permalink
We should call eq instead of sup as we're relating Ty directly and no…
Browse files Browse the repository at this point in the history
…t Binder<TraitRef>
  • Loading branch information
spastorino committed Nov 21, 2023
1 parent 9613bc3 commit 823a7ca
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions compiler/rustc_hir_analysis/src/astconv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1637,10 +1637,8 @@ 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)
.eq(&ObligationCause::dummy(), param_env, impl_ty, self_ty)
.is_err()
{
return false;
Expand Down

0 comments on commit 823a7ca

Please sign in to comment.