@@ -572,7 +572,9 @@ impl<'tcx> TypeckTables<'tcx> {
572572
573573 pub fn node_substs ( & self , id : hir:: HirId ) -> SubstsRef < ' tcx > {
574574 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+ )
576578 }
577579
578580 pub fn node_substs_opt ( & self , id : hir:: HirId ) -> Option < SubstsRef < ' tcx > > {
@@ -942,7 +944,7 @@ impl<'tcx> CommonTypes<'tcx> {
942944 } ;
943945
944946 CommonTypes {
945- unit : mk ( Tuple ( List :: empty ( ) ) ) ,
947+ unit : mk ( Tuple ( SubstsRef :: empty ( ) ) ) ,
946948 bool : mk ( Bool ) ,
947949 char : mk ( Char ) ,
948950 never : mk ( Never ) ,
@@ -2577,13 +2579,13 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
25772579 #[ inline]
25782580 pub fn intern_tup ( self , ts : & [ Ty < ' tcx > ] ) -> Ty < ' tcx > {
25792581 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 ( ) ) )
25812583 }
25822584
25832585 pub fn mk_tup < I : InternAs < [ Ty < ' tcx > ] , Ty < ' tcx > > > ( self , iter : I ) -> I :: Output {
25842586 iter. intern_with ( |ts| {
25852587 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 ( ) ) )
25872589 } )
25882590 }
25892591
0 commit comments