about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/solve/normalize.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-05-13 10:00:38 -0400
committerMichael Goulet <michael@errs.io>2024-05-13 11:59:42 -0400
commit3bcdf3058ef3eaef5042661cf8301acfbcddce65 (patch)
tree3f91249a55f4a965a51ca35dce52e63b55aa398b /compiler/rustc_trait_selection/src/solve/normalize.rs
parentecbe3fd550fccd2cba17ea7e86539bf3e0bfc618 (diff)
downloadrust-3bcdf3058ef3eaef5042661cf8301acfbcddce65.tar.gz
rust-3bcdf3058ef3eaef5042661cf8301acfbcddce65.zip
split out AliasTy -> AliasTerm
Diffstat (limited to 'compiler/rustc_trait_selection/src/solve/normalize.rs')
-rw-r--r--compiler/rustc_trait_selection/src/solve/normalize.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_trait_selection/src/solve/normalize.rs b/compiler/rustc_trait_selection/src/solve/normalize.rs
index 1ac1827bf1c..5d5161e092e 100644
--- a/compiler/rustc_trait_selection/src/solve/normalize.rs
+++ b/compiler/rustc_trait_selection/src/solve/normalize.rs
@@ -7,7 +7,7 @@ use rustc_infer::infer::InferCtxt;
 use rustc_infer::traits::TraitEngineExt;
 use rustc_infer::traits::{FulfillmentError, Obligation, TraitEngine};
 use rustc_middle::traits::ObligationCause;
-use rustc_middle::ty::{self, AliasTy, Ty, TyCtxt, UniverseIndex};
+use rustc_middle::ty::{self, Ty, TyCtxt, UniverseIndex};
 use rustc_middle::ty::{FallibleTypeFolder, TypeFolder, TypeSuperFoldable};
 use rustc_middle::ty::{TypeFoldable, TypeVisitableExt};
 
@@ -63,7 +63,7 @@ impl<'tcx> NormalizationFolder<'_, 'tcx> {
             };
 
             self.at.infcx.err_ctxt().report_overflow_error(
-                OverflowCause::DeeplyNormalize(data),
+                OverflowCause::DeeplyNormalize(data.into()),
                 self.at.cause.span,
                 true,
                 |_| {},
@@ -108,7 +108,7 @@ impl<'tcx> NormalizationFolder<'_, 'tcx> {
         let recursion_limit = tcx.recursion_limit();
         if !recursion_limit.value_within_limit(self.depth) {
             self.at.infcx.err_ctxt().report_overflow_error(
-                OverflowCause::DeeplyNormalize(ty::AliasTy::new(tcx, uv.def, uv.args)),
+                OverflowCause::DeeplyNormalize(uv.into()),
                 self.at.cause.span,
                 true,
                 |_| {},
@@ -122,10 +122,7 @@ impl<'tcx> NormalizationFolder<'_, 'tcx> {
             tcx,
             self.at.cause.clone(),
             self.at.param_env,
-            ty::NormalizesTo {
-                alias: AliasTy::new(tcx, uv.def, uv.args),
-                term: new_infer_ct.into(),
-            },
+            ty::NormalizesTo { alias: uv.into(), term: new_infer_ct.into() },
         );
 
         let result = if infcx.predicate_may_hold(&obligation) {