mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-25 03:19:34 +01:00
Merge #513
513: Fixed some lints from Rust Analyzer with experimental proc-macros r=AfoHT a=korken89 Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
This commit is contained in:
commit
2f180c0e3f
6 changed files with 22 additions and 0 deletions
|
@ -33,6 +33,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
|
|||
// );
|
||||
let t = util::spawn_t_ident(level);
|
||||
items.push(quote!(
|
||||
#[allow(non_snake_case)]
|
||||
#[allow(non_camel_case_types)]
|
||||
#[derive(Clone, Copy)]
|
||||
// #[doc = #doc]
|
||||
|
@ -59,6 +60,8 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
|
|||
// );
|
||||
items.push(quote!(
|
||||
#[doc(hidden)]
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
static #rq: rtic::RacyCell<#rq_ty> = rtic::RacyCell::new(#rq_expr);
|
||||
));
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ pub fn codegen(
|
|||
// For future use
|
||||
// let doc = format!(" RTIC internal: {}:{}", file!(), line!());
|
||||
mod_app.push(quote!(
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
// #[doc = #doc]
|
||||
#[doc(hidden)]
|
||||
|
@ -58,6 +59,7 @@ pub fn codegen(
|
|||
// For future use
|
||||
// let doc = format!(" RTIC internal: {}:{}", file!(), line!());
|
||||
mod_app.push(quote!(
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
// #[doc = #doc]
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -131,6 +131,7 @@ pub fn codegen(
|
|||
items.push(quote!(
|
||||
/// Monotonics used by the system
|
||||
#[allow(non_snake_case)]
|
||||
#[allow(non_camel_case_types)]
|
||||
pub struct #internal_monotonics_ident(
|
||||
#(pub #monotonic_types),*
|
||||
);
|
||||
|
@ -178,6 +179,8 @@ pub fn codegen(
|
|||
items.push(quote!(
|
||||
#(#cfgs)*
|
||||
/// Execution context
|
||||
#[allow(non_snake_case)]
|
||||
#[allow(non_camel_case_types)]
|
||||
pub struct #internal_context_name<#lt> {
|
||||
#(#fields,)*
|
||||
}
|
||||
|
@ -318,6 +321,8 @@ pub fn codegen(
|
|||
|
||||
items.push(quote!(
|
||||
#(#cfgs)*
|
||||
#[allow(non_snake_case)]
|
||||
#[allow(non_camel_case_types)]
|
||||
pub struct #internal_spawn_handle_ident {
|
||||
#[doc(hidden)]
|
||||
marker: u32,
|
||||
|
|
|
@ -30,6 +30,7 @@ pub fn codegen(
|
|||
// For future use
|
||||
// let doc = format!(" RTIC internal: {}:{}", file!(), line!());
|
||||
mod_app.push(quote!(
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
// #[doc = #doc]
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -49,6 +49,8 @@ pub fn codegen(
|
|||
mod_app.push(quote!(
|
||||
// /// Queue version of a free-list that keeps track of empty slots in
|
||||
// /// the following buffers
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
#[doc(hidden)]
|
||||
static #fq: rtic::RacyCell<#fq_ty> = rtic::RacyCell::new(#fq_expr);
|
||||
));
|
||||
|
@ -69,6 +71,8 @@ pub fn codegen(
|
|||
#uninit
|
||||
// /// Buffer that holds the instants associated to the inputs of a task
|
||||
// #[doc = #doc]
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
#[doc(hidden)]
|
||||
static #instants:
|
||||
rtic::RacyCell<[core::mem::MaybeUninit<rtic::time::Instant<#mono_type>>; #cap_lit]> =
|
||||
|
@ -82,6 +86,8 @@ pub fn codegen(
|
|||
mod_app.push(quote!(
|
||||
#uninit
|
||||
// /// Buffer that holds the inputs of a task
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
#[doc(hidden)]
|
||||
static #inputs_ident: rtic::RacyCell<[core::mem::MaybeUninit<#input_ty>; #cap_lit]> =
|
||||
rtic::RacyCell::new([#(#elems,)*]);
|
||||
|
|
|
@ -15,6 +15,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
|
|||
// #[doc = #doc]
|
||||
#[doc(hidden)]
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
static #tq_marker: rtic::RacyCell<u32> = rtic::RacyCell::new(0);
|
||||
));
|
||||
|
||||
|
@ -74,6 +75,8 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
|
|||
// let doc = format!(" RTIC internal: {}:{}", file!(), line!());
|
||||
items.push(quote!(
|
||||
#[doc(hidden)]
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
static #tq: rtic::RacyCell<#tq_ty> =
|
||||
rtic::RacyCell::new(rtic::export::TimerQueue(rtic::export::SortedLinkedList::new_u16()));
|
||||
));
|
||||
|
@ -85,6 +88,8 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
|
|||
|
||||
items.push(quote!(
|
||||
#[doc(hidden)]
|
||||
#[allow(non_camel_case_types)]
|
||||
#[allow(non_upper_case_globals)]
|
||||
static #mono: rtic::RacyCell<Option<#mono_type>> = rtic::RacyCell::new(None);
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue