@@ -572,7 +572,9 @@ impl<'tcx> TypeckTables<'tcx> {
572
572
573
573
pub fn node_substs ( & self , id : hir:: HirId ) -> SubstsRef < ' tcx > {
574
574
validate_hir_id_for_typeck_tables ( self . local_id_root , id, false ) ;
575
- self . node_substs . get ( & id. local_id ) . cloned ( ) . unwrap_or_else ( || InternalSubsts :: empty ( ) . into ( ) )
575
+ self . node_substs . get ( & id. local_id ) . cloned ( ) . unwrap_or_else (
576
+ || InternalSubsts :: empty ( ) . into ( )
577
+ )
576
578
}
577
579
578
580
pub fn node_substs_opt ( & self , id : hir:: HirId ) -> Option < SubstsRef < ' tcx > > {
@@ -942,7 +944,7 @@ impl<'tcx> CommonTypes<'tcx> {
942
944
} ;
943
945
944
946
CommonTypes {
945
- unit : mk ( Tuple ( List :: empty ( ) ) ) ,
947
+ unit : mk ( Tuple ( SubstsRef :: empty ( ) ) ) ,
946
948
bool : mk ( Bool ) ,
947
949
char : mk ( Char ) ,
948
950
never : mk ( Never ) ,
@@ -2577,13 +2579,13 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
2577
2579
#[ inline]
2578
2580
pub fn intern_tup ( self , ts : & [ Ty < ' tcx > ] ) -> Ty < ' tcx > {
2579
2581
let kinds: Vec < _ > = ts. into_iter ( ) . map ( |& t| Kind :: from ( t) ) . collect ( ) ;
2580
- self . mk_ty ( Tuple ( self . intern_substs ( & kinds) ) )
2582
+ self . mk_ty ( Tuple ( self . intern_substs ( & kinds) . into ( ) ) )
2581
2583
}
2582
2584
2583
2585
pub fn mk_tup < I : InternAs < [ Ty < ' tcx > ] , Ty < ' tcx > > > ( self , iter : I ) -> I :: Output {
2584
2586
iter. intern_with ( |ts| {
2585
2587
let kinds: Vec < _ > = ts. into_iter ( ) . map ( |& t| Kind :: from ( t) ) . collect ( ) ;
2586
- self . mk_ty ( Tuple ( self . intern_substs ( & kinds) ) )
2588
+ self . mk_ty ( Tuple ( self . intern_substs ( & kinds) . into ( ) ) )
2587
2589
} )
2588
2590
}
2589
2591
0 commit comments