X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_trait_selection%2Fsrc%2Finfer.rs;h=6c70bbf75163a83348a12cd5ca8415abf1a7e7e8;hb=863d1f653a450011a1b32282f7ecf78662bde53c;hp=25a9c29caa7ab8585f3c95abd874ea3d1d12b443;hpb=4733312e09c04fec3626ea27083da615d1a1df4d;p=rust.git 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 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 @@ fn type_is_sized_modulo_regions( span: Span, ) -> bool; - fn partially_normalize_associated_types_in( - &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 @@ fn type_is_sized_modulo_regions( 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( - &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,