diff --git a/macros/src/codegen/shared_resources.rs b/macros/src/codegen/shared_resources.rs index c53143d735..3ac7a5c0bb 100644 --- a/macros/src/codegen/shared_resources.rs +++ b/macros/src/codegen/shared_resources.rs @@ -130,13 +130,13 @@ pub fn codegen( } } - #[doc = #manual] - impl<'a> __rtic_internal_fooSharedResources<'a> { - #[inline(always)] - pub unsafe fn priority(&self) -> &rtic::export::Priority { - self.priority - } - } + // #[doc = #manual] + // impl<'a> __rtic_internal_fooSharedResources<'a> { + // #[inline(always)] + // pub unsafe fn priority(&self) -> &rtic::export::Priority { + // self.priority + // } + // } #[doc = #manual] impl<'a> rtic::Mutex for __rtic_internal_fooSharedResources<'a> { diff --git a/macros/src/codegen/shared_resources_struct.rs b/macros/src/codegen/shared_resources_struct.rs index dd583291e8..44ef19d710 100644 --- a/macros/src/codegen/shared_resources_struct.rs +++ b/macros/src/codegen/shared_resources_struct.rs @@ -111,6 +111,13 @@ pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2, #(#fields,)* priority: &'a rtic::export::Priority, } + + impl<#lt>#ident<#lt> { + #[inline(always)] + pub unsafe fn priority(&self) -> &rtic::export::Priority { + self.priority + } + } ); let arg = if ctxt.is_init() {