mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
Rollup merge of #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 #118118 but unrelated to that PR. r? `@compiler-errors` `@lcnr`
This commit is contained in:
commit
23461fd694
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user