mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 06:15:45 +01:00
Removed Priority, simplified lifetime handling
This commit is contained in:
parent
53f3d397e7
commit
714020a624
15 changed files with 99 additions and 236 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue