@@ -198,7 +198,7 @@ pub fn codegen(ctxt: Context, app: &App, analysis: &Analysis) -> TokenStream2 {
198198 . collect ( ) ;
199199
200200 if !local_tasks_on_same_executor. is_empty ( ) {
201- let local_spawner = util:: internal_task_ident ( ident , "LocalSpawner" ) ;
201+ let local_spawner = util:: internal_task_ident ( t , "LocalSpawner" ) ;
202202 fields. push ( quote ! {
203203 /// Used to spawn tasks on the same executor
204204 ///
@@ -223,19 +223,20 @@ pub fn codegen(ctxt: Context, app: &App, analysis: &Analysis) -> TokenStream2 {
223223 quote ! ( <' a>)
224224 } ;
225225 let input_vals = inputs. iter ( ) . map ( |i| & i. pat ) . collect :: < Vec < _ > > ( ) ;
226+ let ( _input_args, _input_tupled, _input_untupled, input_ty) = util:: regroup_inputs ( & task. inputs ) ;
226227 quote ! {
227228 #( #attrs) *
228229 #( #cfgs) *
229230 #[ allow( non_snake_case) ]
230- pub ( super ) fn #ident #generics( & self #( , #inputs) * ) {
231+ pub ( super ) fn #ident #generics( & self #( , #inputs) * ) -> :: core :: result :: Result < ( ) , #input_ty> {
231232 // SAFETY: This is safe to call since this can only be called
232233 // from the same executor
233- unsafe { super :: #internal_spawn_ident( #( #input_vals, ) * ) }
234+ unsafe { #internal_spawn_ident( #( #input_vals, ) * ) }
234235 }
235236 }
236237 } )
237238 . collect :: < Vec < _ > > ( ) ;
238- values. push ( quote ! ( local_spawner: #t :: LocalSpawner { _p: core:: marker:: PhantomData } ) ) ;
239+ values. push ( quote ! ( local_spawner: #local_spawner { _p: core:: marker:: PhantomData } ) ) ;
239240 items. push ( quote ! {
240241 struct #local_spawner {
241242 _p: core:: marker:: PhantomData <* mut ( ) >,
0 commit comments