diff options
Diffstat (limited to 'macros/src')
-rw-r--r-- | macros/src/codegen/module.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/macros/src/codegen/module.rs b/macros/src/codegen/module.rs index 17bc34d3..6011c9bc 100644 --- a/macros/src/codegen/module.rs +++ b/macros/src/codegen/module.rs @@ -270,6 +270,7 @@ pub fn codegen( let m_ident = util::monotonic_ident(&monotonic_name); let m_isr = &monotonic.args.binds; let enum_ = util::interrupt_ident(); + let spawn_handle_string = format!("{}::SpawnHandle", m.to_string()); let (enable_interrupt, pend) = if &*m_isr.to_string() == "SysTick" { ( @@ -320,6 +321,12 @@ pub fn codegen( marker: u32, } + impl core::fmt::Debug for #internal_spawn_handle_ident { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_struct(#spawn_handle_string).finish() + } + } + #(#cfgs)* impl #internal_spawn_handle_ident { pub fn cancel(self) -> Result<#ty, ()> { |