@@ -21,9 +21,7 @@ use rustc_middle::middle::stability;
2121use rustc_middle:: ty:: fast_reject:: { simplify_type, TreatParams } ;
2222use rustc_middle:: ty:: subst:: { InternalSubsts , Subst , SubstsRef } ;
2323use rustc_middle:: ty:: GenericParamDefKind ;
24- use rustc_middle:: ty:: {
25- self , EarlyBinder , ParamEnvAnd , ToPredicate , Ty , TyCtxt , TypeFoldable , TypeVisitable ,
26- } ;
24+ use rustc_middle:: ty:: { self , ParamEnvAnd , ToPredicate , Ty , TyCtxt , TypeFoldable , TypeVisitable } ;
2725use rustc_session:: lint;
2826use rustc_span:: def_id:: LocalDefId ;
2927use rustc_span:: lev_distance:: {
@@ -713,7 +711,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
713711 }
714712
715713 let ( impl_ty, impl_substs) = self . impl_ty_and_substs ( impl_def_id) ;
716- let impl_ty = EarlyBinder ( impl_ty) . subst ( self . tcx , impl_substs) ;
714+ let impl_ty = impl_ty. subst ( self . tcx , impl_substs) ;
717715
718716 debug ! ( "impl_ty: {:?}" , impl_ty) ;
719717
@@ -1812,8 +1810,11 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
18121810 }
18131811
18141812 /// Gets the type of an impl and generate substitutions with placeholders.
1815- fn impl_ty_and_substs ( & self , impl_def_id : DefId ) -> ( Ty < ' tcx > , SubstsRef < ' tcx > ) {
1816- ( self . tcx . type_of ( impl_def_id) , self . fresh_item_substs ( impl_def_id) )
1813+ fn impl_ty_and_substs (
1814+ & self ,
1815+ impl_def_id : DefId ,
1816+ ) -> ( ty:: EarlyBinder < Ty < ' tcx > > , SubstsRef < ' tcx > ) {
1817+ ( self . tcx . bound_type_of ( impl_def_id) , self . fresh_item_substs ( impl_def_id) )
18171818 }
18181819
18191820 fn fresh_item_substs ( & self , def_id : DefId ) -> SubstsRef < ' tcx > {
0 commit comments