From 714020a624ca93c42d5da7ebe612e7fc668e1471 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sat, 7 Jan 2023 11:24:13 +0100 Subject: Removed Priority, simplified lifetime handling --- macros/src/codegen/local_resources_struct.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'macros/src/codegen/local_resources_struct.rs') diff --git a/macros/src/codegen/local_resources_struct.rs b/macros/src/codegen/local_resources_struct.rs index 6bcf4fad..a0413f9c 100644 --- a/macros/src/codegen/local_resources_struct.rs +++ b/macros/src/codegen/local_resources_struct.rs @@ -8,7 +8,7 @@ use quote::quote; use crate::codegen::util; /// Generates local resources structs -pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2, TokenStream2) { +pub fn codegen(ctxt: Context, app: &App) -> (TokenStream2, TokenStream2) { let mut lt = None; let resources = match ctxt { @@ -74,16 +74,14 @@ pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2, } if lt.is_some() { - *needs_lt = true; - // The struct could end up empty due to `cfg`s leading to an error due to `'a` being unused if has_cfgs { fields.push(quote!( #[doc(hidden)] - pub __marker__: core::marker::PhantomData<&'a ()> + pub __rtic_internal_marker: ::core::marker::PhantomData<&'a ()> )); - values.push(quote!(__marker__: core::marker::PhantomData)); + values.push(quote!(__rtic_internal_marker: ::core::marker::PhantomData)); } } -- cgit v1.2.3