Make it clear that args default to being related invariantly
This commit is contained in:
parent
cdef3b12de
commit
be29d22eab
3 changed files with 12 additions and 12 deletions
|
@ -56,7 +56,7 @@ impl<'tcx> TypeRelation<'tcx> for Equate<'_, '_, 'tcx> {
|
|||
// performing trait matching (which then performs equality
|
||||
// unification).
|
||||
|
||||
relate::relate_args(self, a_arg, b_arg)
|
||||
relate::relate_args_invariantly(self, a_arg, b_arg)
|
||||
}
|
||||
|
||||
fn relate_with_variance<T: Relate<'tcx>>(
|
||||
|
|
|
@ -183,7 +183,7 @@ where
|
|||
// Avoid fetching the variance if we are in an invariant
|
||||
// context; no need, and it can induce dependency cycles
|
||||
// (e.g., #41849).
|
||||
relate::relate_args(self, a_subst, b_subst)
|
||||
relate::relate_args_invariantly(self, a_subst, b_subst)
|
||||
} else {
|
||||
let tcx = self.tcx();
|
||||
let opt_variances = tcx.variances_of(item_def_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue