]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_traits/src/normalize_projection_ty.rs
Auto merge of #101703 - nicholasbishop:bishop-add-uefi-ci-2, r=jyn514
[rust.git] / compiler / rustc_traits / src / normalize_projection_ty.rs
index 98bb42c9afda1cf0566ed535bb2c3e033dd129b0..e805eb4282119b5db40be90ebe6a6324ffa9f382 100644 (file)
@@ -1,6 +1,5 @@
 use rustc_infer::infer::canonical::{Canonical, QueryResponse};
 use rustc_infer::infer::TyCtxtInferExt;
-use rustc_infer::traits::TraitEngineExt as _;
 use rustc_middle::ty::query::Providers;
 use rustc_middle::ty::{ParamEnvAnd, TyCtxt};
 use rustc_trait_selection::infer::InferCtxtBuilderExt;
@@ -23,8 +22,8 @@ fn normalize_projection_ty<'tcx>(
     tcx.sess.perf_stats.normalize_projection_ty.fetch_add(1, Ordering::Relaxed);
     tcx.infer_ctxt().enter_canonical_trait_query(
         &goal,
-        |infcx, fulfill_cx, ParamEnvAnd { param_env, value: goal }| {
-            let selcx = &mut SelectionContext::new(infcx);
+        |ocx, ParamEnvAnd { param_env, value: goal }| {
+            let selcx = &mut SelectionContext::new(ocx.infcx);
             let cause = ObligationCause::dummy();
             let mut obligations = vec![];
             let answer = traits::normalize_projection_type(
@@ -35,7 +34,7 @@ fn normalize_projection_ty<'tcx>(
                 0,
                 &mut obligations,
             );
-            fulfill_cx.register_predicate_obligations(infcx, obligations);
+            ocx.register_obligations(obligations);
             // FIXME(associated_const_equality): All users of normalize_projection_ty expected
             // a type, but there is the possibility it could've been a const now. Maybe change
             // it to a Term later?