diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:59:35 +0000 |
commit | d1b2d29528b7794b41e66fc2136e395a02f8529b (patch) | |
tree | a4a17504b260206dec3cf55b2dca82929a348ac2 /compiler/rustc_infer/src/infer/generalize.rs | |
parent | Releasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip |
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_infer/src/infer/generalize.rs')
-rw-r--r-- | compiler/rustc_infer/src/infer/generalize.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rustc_infer/src/infer/generalize.rs b/compiler/rustc_infer/src/infer/generalize.rs index 780250167..cf674d5dd 100644 --- a/compiler/rustc_infer/src/infer/generalize.rs +++ b/compiler/rustc_infer/src/infer/generalize.rs @@ -173,21 +173,21 @@ where true } - fn relate_item_substs( + fn relate_item_args( &mut self, item_def_id: DefId, - a_subst: ty::SubstsRef<'tcx>, - b_subst: ty::SubstsRef<'tcx>, - ) -> RelateResult<'tcx, ty::SubstsRef<'tcx>> { + a_subst: ty::GenericArgsRef<'tcx>, + b_subst: ty::GenericArgsRef<'tcx>, + ) -> RelateResult<'tcx, ty::GenericArgsRef<'tcx>> { if self.ambient_variance == ty::Variance::Invariant { // Avoid fetching the variance if we are in an invariant // context; no need, and it can induce dependency cycles // (e.g., #41849). - relate::relate_substs(self, a_subst, b_subst) + relate::relate_args(self, a_subst, b_subst) } else { let tcx = self.tcx(); let opt_variances = tcx.variances_of(item_def_id); - relate::relate_substs_with_variances( + relate::relate_args_with_variances( self, item_def_id, opt_variances, @@ -405,16 +405,16 @@ where } // FIXME: remove this branch once `structurally_relate_consts` is fully // structural. - ty::ConstKind::Unevaluated(ty::UnevaluatedConst { def, substs }) => { - let substs = self.relate_with_variance( + ty::ConstKind::Unevaluated(ty::UnevaluatedConst { def, args }) => { + let args = self.relate_with_variance( ty::Variance::Invariant, ty::VarianceDiagInfo::default(), - substs, - substs, + args, + args, )?; Ok(ty::Const::new_unevaluated( self.tcx(), - ty::UnevaluatedConst { def, substs }, + ty::UnevaluatedConst { def, args }, c.ty(), )) } |