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 24, 2023
1 parent f74f700 commit 6713f29
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 6713f29

Please sign in to comment.