mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-25 19:39:32 +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);
|
let t = util::spawn_t_ident(level);
|
||||||
items.push(quote!(
|
items.push(quote!(
|
||||||
|
#[allow(non_snake_case)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
#[derive(Clone, Copy)]
|
#[derive(Clone, Copy)]
|
||||||
// #[doc = #doc]
|
// #[doc = #doc]
|
||||||
|
@ -59,6 +60,8 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
|
||||||
// );
|
// );
|
||||||
items.push(quote!(
|
items.push(quote!(
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
static #rq: rtic::RacyCell<#rq_ty> = rtic::RacyCell::new(#rq_expr);
|
static #rq: rtic::RacyCell<#rq_ty> = rtic::RacyCell::new(#rq_expr);
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -33,6 +33,7 @@ pub fn codegen(
|
||||||
// For future use
|
// For future use
|
||||||
// let doc = format!(" RTIC internal: {}:{}", file!(), line!());
|
// let doc = format!(" RTIC internal: {}:{}", file!(), line!());
|
||||||
mod_app.push(quote!(
|
mod_app.push(quote!(
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
#[allow(non_upper_case_globals)]
|
#[allow(non_upper_case_globals)]
|
||||||
// #[doc = #doc]
|
// #[doc = #doc]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
@ -58,6 +59,7 @@ pub fn codegen(
|
||||||
// For future use
|
// For future use
|
||||||
// let doc = format!(" RTIC internal: {}:{}", file!(), line!());
|
// let doc = format!(" RTIC internal: {}:{}", file!(), line!());
|
||||||
mod_app.push(quote!(
|
mod_app.push(quote!(
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
#[allow(non_upper_case_globals)]
|
#[allow(non_upper_case_globals)]
|
||||||
// #[doc = #doc]
|
// #[doc = #doc]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
|
|
@ -131,6 +131,7 @@ pub fn codegen(
|
||||||
items.push(quote!(
|
items.push(quote!(
|
||||||
/// Monotonics used by the system
|
/// Monotonics used by the system
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
pub struct #internal_monotonics_ident(
|
pub struct #internal_monotonics_ident(
|
||||||
#(pub #monotonic_types),*
|
#(pub #monotonic_types),*
|
||||||
);
|
);
|
||||||
|
@ -178,6 +179,8 @@ pub fn codegen(
|
||||||
items.push(quote!(
|
items.push(quote!(
|
||||||
#(#cfgs)*
|
#(#cfgs)*
|
||||||
/// Execution context
|
/// Execution context
|
||||||
|
#[allow(non_snake_case)]
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
pub struct #internal_context_name<#lt> {
|
pub struct #internal_context_name<#lt> {
|
||||||
#(#fields,)*
|
#(#fields,)*
|
||||||
}
|
}
|
||||||
|
@ -318,6 +321,8 @@ pub fn codegen(
|
||||||
|
|
||||||
items.push(quote!(
|
items.push(quote!(
|
||||||
#(#cfgs)*
|
#(#cfgs)*
|
||||||
|
#[allow(non_snake_case)]
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
pub struct #internal_spawn_handle_ident {
|
pub struct #internal_spawn_handle_ident {
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
marker: u32,
|
marker: u32,
|
||||||
|
|
|
@ -30,6 +30,7 @@ pub fn codegen(
|
||||||
// For future use
|
// For future use
|
||||||
// let doc = format!(" RTIC internal: {}:{}", file!(), line!());
|
// let doc = format!(" RTIC internal: {}:{}", file!(), line!());
|
||||||
mod_app.push(quote!(
|
mod_app.push(quote!(
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
#[allow(non_upper_case_globals)]
|
#[allow(non_upper_case_globals)]
|
||||||
// #[doc = #doc]
|
// #[doc = #doc]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
|
|
@ -49,6 +49,8 @@ pub fn codegen(
|
||||||
mod_app.push(quote!(
|
mod_app.push(quote!(
|
||||||
// /// Queue version of a free-list that keeps track of empty slots in
|
// /// Queue version of a free-list that keeps track of empty slots in
|
||||||
// /// the following buffers
|
// /// the following buffers
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
static #fq: rtic::RacyCell<#fq_ty> = rtic::RacyCell::new(#fq_expr);
|
static #fq: rtic::RacyCell<#fq_ty> = rtic::RacyCell::new(#fq_expr);
|
||||||
));
|
));
|
||||||
|
@ -69,6 +71,8 @@ pub fn codegen(
|
||||||
#uninit
|
#uninit
|
||||||
// /// Buffer that holds the instants associated to the inputs of a task
|
// /// Buffer that holds the instants associated to the inputs of a task
|
||||||
// #[doc = #doc]
|
// #[doc = #doc]
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
static #instants:
|
static #instants:
|
||||||
rtic::RacyCell<[core::mem::MaybeUninit<rtic::time::Instant<#mono_type>>; #cap_lit]> =
|
rtic::RacyCell<[core::mem::MaybeUninit<rtic::time::Instant<#mono_type>>; #cap_lit]> =
|
||||||
|
@ -82,6 +86,8 @@ pub fn codegen(
|
||||||
mod_app.push(quote!(
|
mod_app.push(quote!(
|
||||||
#uninit
|
#uninit
|
||||||
// /// Buffer that holds the inputs of a task
|
// /// Buffer that holds the inputs of a task
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
static #inputs_ident: rtic::RacyCell<[core::mem::MaybeUninit<#input_ty>; #cap_lit]> =
|
static #inputs_ident: rtic::RacyCell<[core::mem::MaybeUninit<#input_ty>; #cap_lit]> =
|
||||||
rtic::RacyCell::new([#(#elems,)*]);
|
rtic::RacyCell::new([#(#elems,)*]);
|
||||||
|
|
|
@ -15,6 +15,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
|
||||||
// #[doc = #doc]
|
// #[doc = #doc]
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[allow(non_camel_case_types)]
|
#[allow(non_camel_case_types)]
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
static #tq_marker: rtic::RacyCell<u32> = rtic::RacyCell::new(0);
|
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!());
|
// let doc = format!(" RTIC internal: {}:{}", file!(), line!());
|
||||||
items.push(quote!(
|
items.push(quote!(
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
static #tq: rtic::RacyCell<#tq_ty> =
|
static #tq: rtic::RacyCell<#tq_ty> =
|
||||||
rtic::RacyCell::new(rtic::export::TimerQueue(rtic::export::SortedLinkedList::new_u16()));
|
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!(
|
items.push(quote!(
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
static #mono: rtic::RacyCell<Option<#mono_type>> = rtic::RacyCell::new(None);
|
static #mono: rtic::RacyCell<Option<#mono_type>> = rtic::RacyCell::new(None);
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue