@@ -928,7 +928,7 @@ impl<I: Interner> ty::Binder<I, FnSig<I>> {
928928 pub fn split ( self ) -> ( ty:: Binder < I , FnSigTys < I > > , FnHeader < I > ) {
929929 let hdr =
930930 FnHeader { c_variadic : self . c_variadic ( ) , safety : self . safety ( ) , abi : self . abi ( ) } ;
931- ( self . map_bound ( |sig| FnSigTys ( sig. inputs_and_output ) ) , hdr)
931+ ( self . map_bound ( |sig| FnSigTys { inputs_and_output : sig. inputs_and_output } ) , hdr)
932932 }
933933}
934934
@@ -971,23 +971,25 @@ impl<I: Interner> fmt::Debug for FnSig<I> {
971971#[ derive_where( Clone , Copy , Debug , PartialEq , Eq , Hash ; I : Interner ) ]
972972#[ cfg_attr( feature = "nightly" , derive( TyEncodable , TyDecodable , HashStable_NoContext ) ) ]
973973#[ derive( TypeVisitable_Generic , TypeFoldable_Generic , Lift_Generic ) ]
974- pub struct FnSigTys < I : Interner > ( pub I :: Tys ) ;
974+ pub struct FnSigTys < I : Interner > {
975+ pub inputs_and_output : I :: Tys ,
976+ }
975977
976978impl < I : Interner > FnSigTys < I > {
977979 pub fn inputs ( self ) -> I :: FnInputTys {
978- self . 0 . inputs ( )
980+ self . inputs_and_output . inputs ( )
979981 }
980982
981983 pub fn output ( self ) -> I :: Ty {
982- self . 0 . output ( )
984+ self . inputs_and_output . output ( )
983985 }
984986}
985987
986988impl < I : Interner > ty:: Binder < I , FnSigTys < I > > {
987989 // Used to combine the two fields in `TyKind::FnPtr` into a single value.
988990 pub fn with ( self , hdr : FnHeader < I > ) -> ty:: Binder < I , FnSig < I > > {
989991 self . map_bound ( |sig_tys| FnSig {
990- inputs_and_output : sig_tys. 0 ,
992+ inputs_and_output : sig_tys. inputs_and_output ,
991993 c_variadic : hdr. c_variadic ,
992994 safety : hdr. safety ,
993995 abi : hdr. abi ,
@@ -1006,7 +1008,7 @@ impl<I: Interner> ty::Binder<I, FnSigTys<I>> {
10061008 }
10071009
10081010 pub fn inputs_and_output ( self ) -> ty:: Binder < I , I :: Tys > {
1009- self . map_bound ( |sig_tys| sig_tys. 0 )
1011+ self . map_bound ( |sig_tys| sig_tys. inputs_and_output )
10101012 }
10111013
10121014 #[ inline]
0 commit comments