@@ -482,11 +482,8 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
482
482
) ;
483
483
let region =
484
484
self . infcx . tcx . mk_re_var ( self . infcx . next_nll_region_var ( FR ) . to_region_vid ( ) ) ;
485
- let va_list_ty = self
486
- . infcx
487
- . tcx
488
- . bound_type_of ( va_list_did)
489
- . subst ( self . infcx . tcx , & [ region. into ( ) ] ) ;
485
+ let va_list_ty =
486
+ self . infcx . tcx . type_of ( va_list_did) . subst ( self . infcx . tcx , & [ region. into ( ) ] ) ;
490
487
491
488
unnormalized_input_tys = self . infcx . tcx . mk_type_list (
492
489
unnormalized_input_tys. iter ( ) . copied ( ) . chain ( iter:: once ( va_list_ty) ) ,
@@ -529,7 +526,7 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
529
526
match tcx. hir ( ) . body_owner_kind ( self . mir_def . did ) {
530
527
BodyOwnerKind :: Closure | BodyOwnerKind :: Fn => {
531
528
let defining_ty = if self . mir_def . did . to_def_id ( ) == typeck_root_def_id {
532
- tcx. bound_type_of ( typeck_root_def_id) . subst_identity ( )
529
+ tcx. type_of ( typeck_root_def_id) . subst_identity ( )
533
530
} else {
534
531
let tables = tcx. typeck ( self . mir_def . did ) ;
535
532
tables. node_type ( self . mir_hir_id )
@@ -675,7 +672,7 @@ impl<'cx, 'tcx> UniversalRegionsBuilder<'cx, 'tcx> {
675
672
// For a constant body, there are no inputs, and one
676
673
// "output" (the type of the constant).
677
674
assert_eq ! ( self . mir_def. did. to_def_id( ) , def_id) ;
678
- let ty = tcx. bound_type_of ( self . mir_def . def_id_for_type_of ( ) ) . subst_identity ( ) ;
675
+ let ty = tcx. type_of ( self . mir_def . def_id_for_type_of ( ) ) . subst_identity ( ) ;
679
676
let ty = indices. fold_to_region_vids ( tcx, ty) ;
680
677
ty:: Binder :: dummy ( tcx. intern_type_list ( & [ ty] ) )
681
678
}
0 commit comments