From 1459adadeb6983885c288a300607a2e90c2c674f Mon Sep 17 00:00:00 2001 From: Per Lindgren Date: Mon, 18 Oct 2021 16:14:52 +0200 Subject: [PATCH] api test (priority automated) --- macros/src/codegen/shared_resources.rs | 14 +++++++------- macros/src/codegen/shared_resources_struct.rs | 7 +++++++ 2 files changed, 14 insertions(+), 7 deletions(-) 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() {