diff --git a/macros/src/codegen/shared_resources.rs b/macros/src/codegen/shared_resources.rs index fc3184cc05..6285752672 100644 --- a/macros/src/codegen/shared_resources.rs +++ b/macros/src/codegen/shared_resources.rs @@ -128,13 +128,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 77c5646089..05e222e4d5 100644 --- a/macros/src/codegen/shared_resources_struct.rs +++ b/macros/src/codegen/shared_resources_struct.rs @@ -110,6 +110,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() {