diff options
| author | Michael Goulet <michael@errs.io> | 2023-09-28 06:37:35 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-10-04 04:22:04 +0000 |
| commit | be29d22eab8d3808aad5ecd6c14a9b618352736f (patch) | |
| tree | 20cc16499ef35b850d4f333e3bb88fec50b4fe25 /compiler/rustc_infer/src | |
| parent | cdef3b12deb37edfc6b27ab05ef23faa777b35c3 (diff) | |
| download | rust-be29d22eab8d3808aad5ecd6c14a9b618352736f.tar.gz rust-be29d22eab8d3808aad5ecd6c14a9b618352736f.zip | |
Make it clear that args default to being related invariantly
Diffstat (limited to 'compiler/rustc_infer/src')
| -rw-r--r-- | compiler/rustc_infer/src/infer/equate.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_infer/src/infer/generalize.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_infer/src/infer/equate.rs b/compiler/rustc_infer/src/infer/equate.rs index 665297da20f..5d929394eb0 100644 --- a/compiler/rustc_infer/src/infer/equate.rs +++ b/compiler/rustc_infer/src/infer/equate.rs @@ -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>>( diff --git a/compiler/rustc_infer/src/infer/generalize.rs b/compiler/rustc_infer/src/infer/generalize.rs index dd7f8d35441..c1e65ffe0a6 100644 --- a/compiler/rustc_infer/src/infer/generalize.rs +++ b/compiler/rustc_infer/src/infer/generalize.rs @@ -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); |
