about summary refs log tree commit diff
path: root/compiler/rustc_traits
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-01-24 16:55:29 +0000
committerMichael Goulet <michael@errs.io>2025-01-24 16:55:29 +0000
commit4e3e91555cdd918827bec345667a1c119034b0d6 (patch)
treee455ff455a4b00bed7d69de0bec28c2346b3c5b4 /compiler/rustc_traits
parent8231e8599e238ff4e717639bd68c6abb8579fe8d (diff)
downloadrust-4e3e91555cdd918827bec345667a1c119034b0d6.tar.gz
rust-4e3e91555cdd918827bec345667a1c119034b0d6.zip
Revert "Rollup merge of #135914 - compiler-errors:vanquish-query-norm, r=jackh726"
This reverts commit 556d901c36511560e0ae8ce3058507121a2fb2f0, reversing
changes made to be15391703babf217aaef3c854213a7fcd70e00b.
Diffstat (limited to 'compiler/rustc_traits')
-rw-r--r--compiler/rustc_traits/src/type_op.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_traits/src/type_op.rs b/compiler/rustc_traits/src/type_op.rs
index 5d041c2623a..71088a598bb 100644
--- a/compiler/rustc_traits/src/type_op.rs
+++ b/compiler/rustc_traits/src/type_op.rs
@@ -6,12 +6,13 @@ use rustc_middle::query::Providers;
 use rustc_middle::traits::query::NoSolution;
 use rustc_middle::ty::{Clause, FnSig, ParamEnvAnd, PolyFnSig, Ty, TyCtxt, TypeFoldable};
 use rustc_trait_selection::infer::InferCtxtBuilderExt;
+use rustc_trait_selection::traits::query::normalize::QueryNormalizeExt;
 use rustc_trait_selection::traits::query::type_op::ascribe_user_type::{
     AscribeUserType, type_op_ascribe_user_type_with_span,
 };
 use rustc_trait_selection::traits::query::type_op::normalize::Normalize;
 use rustc_trait_selection::traits::query::type_op::prove_predicate::ProvePredicate;
-use rustc_trait_selection::traits::{Obligation, ObligationCause, ObligationCtxt};
+use rustc_trait_selection::traits::{Normalized, Obligation, ObligationCause, ObligationCtxt};
 
 pub(crate) fn provide(p: &mut Providers) {
     *p = Providers {
@@ -42,7 +43,10 @@ where
     T: fmt::Debug + TypeFoldable<TyCtxt<'tcx>>,
 {
     let (param_env, Normalize { value }) = key.into_parts();
-    Ok(ocx.normalize(&ObligationCause::dummy(), param_env, value))
+    let Normalized { value, obligations } =
+        ocx.infcx.at(&ObligationCause::dummy(), param_env).query_normalize(value)?;
+    ocx.register_obligations(obligations);
+    Ok(value)
 }
 
 fn type_op_normalize_ty<'tcx>(