diff options
author | 2023-01-07 11:24:13 +0100 | |
---|---|---|
committer | 2023-03-01 00:31:06 +0100 | |
commit | 714020a624ca93c42d5da7ebe612e7fc668e1471 (patch) | |
tree | 798716e0fd29d0b6235bb5bbec2dd11dba658ecc /macros/src/codegen/shared_resources.rs | |
parent | 53f3d397e76383deabbe9579a3522174c422a958 (diff) | |
download | rtic-714020a624ca93c42d5da7ebe612e7fc668e1471.tar.gz rtic-714020a624ca93c42d5da7ebe612e7fc668e1471.tar.zst rtic-714020a624ca93c42d5da7ebe612e7fc668e1471.zip |
Removed Priority, simplified lifetime handling
Diffstat (limited to 'macros/src/codegen/shared_resources.rs')
-rw-r--r-- | macros/src/codegen/shared_resources.rs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/macros/src/codegen/shared_resources.rs b/macros/src/codegen/shared_resources.rs index b63e7432..5c54fb99 100644 --- a/macros/src/codegen/shared_resources.rs +++ b/macros/src/codegen/shared_resources.rs @@ -57,19 +57,14 @@ pub fn codegen( #[allow(non_camel_case_types)] #(#cfgs)* pub struct #shared_name<'a> { - priority: &'a Priority, + __rtic_internal_p: ::core::marker::PhantomData<&'a ()>, } #(#cfgs)* impl<'a> #shared_name<'a> { #[inline(always)] - pub unsafe fn new(priority: &'a Priority) -> Self { - #shared_name { priority } - } - - #[inline(always)] - pub unsafe fn priority(&self) -> &Priority { - self.priority + pub unsafe fn new() -> Self { + #shared_name { __rtic_internal_p: ::core::marker::PhantomData } } } )); @@ -104,8 +99,6 @@ pub fn codegen( quote!() } else { quote!(mod shared_resources { - use rtic::export::Priority; - #(#mod_resources)* }) }; |