@@ -26,11 +26,9 @@ use rustc_hir::intravisit::{walk_generics, Visitor as _};
26
26
use rustc_hir:: { GenericArg , GenericArgs , OpaqueTyOrigin } ;
27
27
use rustc_middle:: middle:: stability:: AllowUnstable ;
28
28
use rustc_middle:: ty:: subst:: { self , GenericArgKind , InternalSubsts , SubstsRef } ;
29
- use rustc_middle:: ty:: DynKind ;
30
29
use rustc_middle:: ty:: GenericParamDefKind ;
31
- use rustc_middle:: ty:: {
32
- self , Const , DefIdTree , EarlyBinder , IsSuggestable , Ty , TyCtxt , TypeVisitable ,
33
- } ;
30
+ use rustc_middle:: ty:: { self , Const , DefIdTree , IsSuggestable , Ty , TyCtxt , TypeVisitable } ;
31
+ use rustc_middle:: ty:: { DynKind , EarlyBinder } ;
34
32
use rustc_session:: lint:: builtin:: { AMBIGUOUS_ASSOCIATED_ITEMS , BARE_TRAIT_OBJECTS } ;
35
33
use rustc_span:: edition:: Edition ;
36
34
use rustc_span:: lev_distance:: find_best_match_for_name;
@@ -490,7 +488,8 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
490
488
self . astconv
491
489
. normalize_ty (
492
490
self . span ,
493
- EarlyBinder ( tcx. at ( self . span ) . type_of ( param. def_id ) )
491
+ tcx. at ( self . span )
492
+ . bound_type_of ( param. def_id )
494
493
. subst ( tcx, substs) ,
495
494
)
496
495
. into ( )
@@ -1258,10 +1257,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
1258
1257
item_segment : & hir:: PathSegment < ' _ > ,
1259
1258
) -> Ty < ' tcx > {
1260
1259
let substs = self . ast_path_substs_for_ty ( span, did, item_segment) ;
1261
- self . normalize_ty (
1262
- span,
1263
- EarlyBinder ( self . tcx ( ) . at ( span) . type_of ( did) ) . subst ( self . tcx ( ) , substs) ,
1264
- )
1260
+ self . normalize_ty ( span, self . tcx ( ) . at ( span) . bound_type_of ( did) . subst ( self . tcx ( ) , substs) )
1265
1261
}
1266
1262
1267
1263
fn conv_object_ty_poly_trait_ref (
0 commit comments