about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/infer.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2022-11-25 17:11:15 +0000
committerMichael Goulet <michael@errs.io>2022-11-28 17:35:39 +0000
commitfc710832eadb31c747fb2997d882c5a08de2c10e (patch)
treee27c4869ebce7a4eb419de191f1a745e48f107d0 /compiler/rustc_trait_selection/src/infer.rs
parentf12e772b83c3ff6a099a66920f73fa145e21b0f3 (diff)
downloadrust-fc710832eadb31c747fb2997d882c5a08de2c10e.tar.gz
rust-fc710832eadb31c747fb2997d882c5a08de2c10e.zip
partially_normalize_... -> At::normalize
Diffstat (limited to 'compiler/rustc_trait_selection/src/infer.rs')
-rw-r--r--compiler/rustc_trait_selection/src/infer.rs28
1 files changed, 0 insertions, 28 deletions
diff --git a/compiler/rustc_trait_selection/src/infer.rs b/compiler/rustc_trait_selection/src/infer.rs
index 25a9c29caa7..6c70bbf7516 100644
--- a/compiler/rustc_trait_selection/src/infer.rs
+++ b/compiler/rustc_trait_selection/src/infer.rs
@@ -3,7 +3,6 @@ use crate::traits::{self, ObligationCtxt};
 
 use rustc_hir::def_id::DefId;
 use rustc_hir::lang_items::LangItem;
-use rustc_infer::traits::ObligationCause;
 use rustc_middle::arena::ArenaAllocatable;
 use rustc_middle::infer::canonical::{Canonical, CanonicalizedQueryResponse, QueryResponse};
 use rustc_middle::traits::query::Fallible;
@@ -30,15 +29,6 @@ pub trait InferCtxtExt<'tcx> {
         span: Span,
     ) -> bool;
 
-    fn partially_normalize_associated_types_in<T>(
-        &self,
-        cause: ObligationCause<'tcx>,
-        param_env: ty::ParamEnv<'tcx>,
-        value: T,
-    ) -> InferOk<'tcx, T>
-    where
-        T: TypeFoldable<'tcx>;
-
     /// Check whether a `ty` implements given trait(trait_def_id).
     /// The inputs are:
     ///
@@ -88,24 +78,6 @@ impl<'tcx> InferCtxtExt<'tcx> for InferCtxt<'tcx> {
         traits::type_known_to_meet_bound_modulo_regions(self, param_env, ty, lang_item, span)
     }
 
-    /// Normalizes associated types in `value`, potentially returning
-    /// new obligations that must further be processed.
-    #[instrument(level = "debug", skip(self, cause, param_env), ret)]
-    fn partially_normalize_associated_types_in<T>(
-        &self,
-        cause: ObligationCause<'tcx>,
-        param_env: ty::ParamEnv<'tcx>,
-        value: T,
-    ) -> InferOk<'tcx, T>
-    where
-        T: TypeFoldable<'tcx>,
-    {
-        let mut selcx = traits::SelectionContext::new(self);
-        let traits::Normalized { value, obligations } =
-            traits::normalize(&mut selcx, param_env, cause, value);
-        InferOk { value, obligations }
-    }
-
     #[instrument(level = "debug", skip(self, params), ret)]
     fn type_implements_trait(
         &self,