@@ -21,9 +21,7 @@ use rustc_middle::middle::stability;
21
21
use rustc_middle:: ty:: fast_reject:: { simplify_type, TreatParams } ;
22
22
use rustc_middle:: ty:: subst:: { InternalSubsts , Subst , SubstsRef } ;
23
23
use 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 } ;
27
25
use rustc_session:: lint;
28
26
use rustc_span:: def_id:: LocalDefId ;
29
27
use rustc_span:: lev_distance:: {
@@ -713,7 +711,7 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
713
711
}
714
712
715
713
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) ;
717
715
718
716
debug ! ( "impl_ty: {:?}" , impl_ty) ;
719
717
@@ -1812,8 +1810,11 @@ impl<'a, 'tcx> ProbeContext<'a, 'tcx> {
1812
1810
}
1813
1811
1814
1812
/// 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) )
1817
1818
}
1818
1819
1819
1820
fn fresh_item_substs ( & self , def_id : DefId ) -> SubstsRef < ' tcx > {
0 commit comments