@@ -928,7 +928,7 @@ impl<I: Interner> ty::Binder<I, FnSig<I>> {
928
928
pub fn split ( self ) -> ( ty:: Binder < I , FnSigTys < I > > , FnHeader < I > ) {
929
929
let hdr =
930
930
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)
932
932
}
933
933
}
934
934
@@ -971,23 +971,25 @@ impl<I: Interner> fmt::Debug for FnSig<I> {
971
971
#[ derive_where( Clone , Copy , Debug , PartialEq , Eq , Hash ; I : Interner ) ]
972
972
#[ cfg_attr( feature = "nightly" , derive( TyEncodable , TyDecodable , HashStable_NoContext ) ) ]
973
973
#[ 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
+ }
975
977
976
978
impl < I : Interner > FnSigTys < I > {
977
979
pub fn inputs ( self ) -> I :: FnInputTys {
978
- self . 0 . inputs ( )
980
+ self . inputs_and_output . inputs ( )
979
981
}
980
982
981
983
pub fn output ( self ) -> I :: Ty {
982
- self . 0 . output ( )
984
+ self . inputs_and_output . output ( )
983
985
}
984
986
}
985
987
986
988
impl < I : Interner > ty:: Binder < I , FnSigTys < I > > {
987
989
// Used to combine the two fields in `TyKind::FnPtr` into a single value.
988
990
pub fn with ( self , hdr : FnHeader < I > ) -> ty:: Binder < I , FnSig < I > > {
989
991
self . map_bound ( |sig_tys| FnSig {
990
- inputs_and_output : sig_tys. 0 ,
992
+ inputs_and_output : sig_tys. inputs_and_output ,
991
993
c_variadic : hdr. c_variadic ,
992
994
safety : hdr. safety ,
993
995
abi : hdr. abi ,
@@ -1006,7 +1008,7 @@ impl<I: Interner> ty::Binder<I, FnSigTys<I>> {
1006
1008
}
1007
1009
1008
1010
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 )
1010
1012
}
1011
1013
1012
1014
#[ inline]
0 commit comments