Skip to content

Commit 3dea5d5

Browse files
committed
We should call eq instead of sup as we're relating Ty directly and not Binder<TraitRef>
1 parent 6b84edf commit 3dea5d5

File tree

1 file changed

+1
-3
lines changed
  • compiler/rustc_hir_analysis/src/astconv

1 file changed

+1
-3
lines changed

compiler/rustc_hir_analysis/src/astconv/mod.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1641,10 +1641,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
16411641
let impl_ty = ocx.normalize(&cause, param_env, impl_ty);
16421642

16431643
// Check that the self types can be related.
1644-
// FIXME(inherent_associated_types): Should we use `eq` here? Method probing uses
1645-
// `sup` for this situtation, too. What for? To constrain inference variables?
16461644
if ocx
1647-
.sup(&ObligationCause::dummy(), param_env, impl_ty, self_ty)
1645+
.eq(&ObligationCause::dummy(), param_env, impl_ty, self_ty)
16481646
.is_err()
16491647
{
16501648
return false;

0 commit comments

Comments
 (0)