summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /compiler/rustc_middle/src/ty/normalize_erasing_regions.rs
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-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_middle/src/ty/normalize_erasing_regions.rs')
-rw-r--r--compiler/rustc_middle/src/ty/normalize_erasing_regions.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs b/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs
index a0c8d299f..2415d50b2 100644
--- a/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs
+++ b/compiler/rustc_middle/src/ty/normalize_erasing_regions.rs
@@ -9,7 +9,7 @@
use crate::traits::query::NoSolution;
use crate::ty::fold::{FallibleTypeFolder, TypeFoldable, TypeFolder};
-use crate::ty::{self, EarlyBinder, SubstsRef, Ty, TyCtxt, TypeVisitableExt};
+use crate::ty::{self, EarlyBinder, GenericArgsRef, Ty, TyCtxt, TypeVisitableExt};
#[derive(Debug, Copy, Clone, HashStable, TyEncodable, TyDecodable)]
pub enum NormalizationError<'tcx> {
@@ -20,8 +20,8 @@ pub enum NormalizationError<'tcx> {
impl<'tcx> NormalizationError<'tcx> {
pub fn get_type_for_failure(&self) -> String {
match self {
- NormalizationError::Type(t) => format!("{}", t),
- NormalizationError::Const(c) => format!("{}", c),
+ NormalizationError::Type(t) => format!("{t}"),
+ NormalizationError::Const(c) => format!("{c}"),
}
}
}
@@ -137,7 +137,7 @@ impl<'tcx> TyCtxt<'tcx> {
/// use `try_subst_and_normalize_erasing_regions` instead.
pub fn subst_and_normalize_erasing_regions<T>(
self,
- param_substs: SubstsRef<'tcx>,
+ param_args: GenericArgsRef<'tcx>,
param_env: ty::ParamEnv<'tcx>,
value: EarlyBinder<T>,
) -> T
@@ -146,12 +146,12 @@ impl<'tcx> TyCtxt<'tcx> {
{
debug!(
"subst_and_normalize_erasing_regions(\
- param_substs={:?}, \
+ param_args={:?}, \
value={:?}, \
param_env={:?})",
- param_substs, value, param_env,
+ param_args, value, param_env,
);
- let substituted = value.subst(self, param_substs);
+ let substituted = value.instantiate(self, param_args);
self.normalize_erasing_regions(param_env, substituted)
}
@@ -161,7 +161,7 @@ impl<'tcx> TyCtxt<'tcx> {
/// not assume that normalization succeeds.
pub fn try_subst_and_normalize_erasing_regions<T>(
self,
- param_substs: SubstsRef<'tcx>,
+ param_args: GenericArgsRef<'tcx>,
param_env: ty::ParamEnv<'tcx>,
value: EarlyBinder<T>,
) -> Result<T, NormalizationError<'tcx>>
@@ -170,12 +170,12 @@ impl<'tcx> TyCtxt<'tcx> {
{
debug!(
"subst_and_normalize_erasing_regions(\
- param_substs={:?}, \
+ param_args={:?}, \
value={:?}, \
param_env={:?})",
- param_substs, value, param_env,
+ param_args, value, param_env,
);
- let substituted = value.subst(self, param_substs);
+ let substituted = value.instantiate(self, param_args);
self.try_normalize_erasing_regions(param_env, substituted)
}
}