@@ -97,20 +97,9 @@ macro_rules! impl_fn {
9797 }
9898 impl_fn!( @impl_safe_fn_type ( $( $nm : $ty) ,* ) , $fn_type, $safety) ;
9999
100- #[ automatically_derived]
101- impl <Output : ' static , $( $ty: ' static ) ,* > $crate:: StaticFnPtr for $fn_type {
102- }
103-
104100 #[ automatically_derived]
105101 impl <Output , $( $ty) ,* > $crate:: BuildFn <$crate:: safety!( $safety) , $crate:: abi:: $abi_ident, Output > for ( $( $ty, ) * ) {
106- type F = impl_fn!( @make_unsafe extern $call_conv fn ( $( $ty) ,* ) -> Output , $safety) ;
107- }
108- } ;
109-
110- ( @impl_withabi ( $( $nm: ident : $ty: ident) ,* ) , $fn_type: ty, $safety: tt, $abi: tt) => {
111- #[ automatically_derived]
112- impl <Output , $( $ty) ,* > $crate:: WithAbi <$crate:: abi!( $abi) > for $fn_type {
113- type F = impl_fn!( @make_unsafe extern $abi fn ( $( $ty) ,* ) -> Output , $safety) ;
102+ type F = impl_fn!( @make_unsafe extern $call_conv fn ( $( $ty) ,* ) -> Output , $safety) ;
114103 }
115104 } ;
116105
@@ -122,22 +111,19 @@ macro_rules! impl_fn {
122111 ( @impl_safe_fn_type ( $( $nm: ident : $ty: ident) ,* ) , $fn_type: ty, true ) => {
123112 #[ automatically_derived]
124113 impl <Output , $( $ty) ,* > $crate:: SafeFnPtr for $fn_type {
125- fn invoke( & self , impl_fn! ( @call_args ( $( $nm) , * ) ) : Self :: Args ) -> Self :: Output {
114+ fn invoke( & self , ( $( $nm, ) * ) : Self :: Args ) -> Self :: Output {
126115 ( * self ) ( $( $nm) ,* )
127116 }
128117 }
129118 } ;
130119 ( @impl_safe_fn_type ( $( $nm: ident : $ty: ident) ,* ) , $fn_type: ty, false ) => {
131120 #[ automatically_derived]
132121 impl <Output , $( $ty) ,* > $crate:: UnsafeFnPtr for $fn_type {
133- unsafe fn invoke( & self , impl_fn! ( @call_args ( $( $nm) , * ) ) : Self :: Args ) -> Self :: Output {
122+ unsafe fn invoke( & self , ( $( $nm, ) * ) : Self :: Args ) -> Self :: Output {
134123 unsafe { ( * self ) ( $( $nm) ,* ) }
135124 }
136125 }
137126 } ;
138-
139- ( @call_args ( $single: ident) ) => { ( $single, ) } ;
140- ( @call_args ( $( $args: ident) ,* ) ) => { ( $( $args) ,* ) } ;
141127}
142128
143129// Default: generate impls up to 6 arguments
0 commit comments