From 13f7516a4d88f15763b7186cc3a95ccb3cfbd5c0 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Thu, 19 Aug 2021 08:21:18 +0200 Subject: Fixed some lints from Rust Analyzer with experimental proc-macros --- macros/src/codegen/software_tasks.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'macros/src/codegen/software_tasks.rs') diff --git a/macros/src/codegen/software_tasks.rs b/macros/src/codegen/software_tasks.rs index 0b07335..17399b5 100644 --- a/macros/src/codegen/software_tasks.rs +++ b/macros/src/codegen/software_tasks.rs @@ -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>; #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,)*]); -- cgit v1.2.3 From cdbd8a2cede668e1181030bd7c439592a8f0e980 Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Thu, 19 Aug 2021 21:32:12 +0200 Subject: Use `mark_internal_name` by default for methods in `util` to make usage of these functions more straightforward. fq_ident is always internal rq_ident is always internal monotonic_ident is always internal inputs_ident is always internal local_resources_ident is always internal shared_resources_ident is always internal monotonic_instants_ident is always internal tq_ident is always internal timer_queue_marker_ident is always internal static_shared_resource_ident is always internal static_local_resource_ident is always internal declared_static_local_resource_ident is always internal Only names, not idents, are now marked as internal Use same rtic internal everywhere --- macros/src/codegen/software_tasks.rs | 3 --- 1 file changed, 3 deletions(-) (limited to 'macros/src/codegen/software_tasks.rs') diff --git a/macros/src/codegen/software_tasks.rs b/macros/src/codegen/software_tasks.rs index 17399b5..1669a3f 100644 --- a/macros/src/codegen/software_tasks.rs +++ b/macros/src/codegen/software_tasks.rs @@ -37,7 +37,6 @@ pub fn codegen( // Create free queues and inputs / instants buffers let fq = util::fq_ident(name); - let fq = util::mark_internal_ident(&fq); let (fq_ty, fq_expr, mk_uninit): (_, _, Box Option<_>>) = { ( @@ -61,7 +60,6 @@ pub fn codegen( for (_, monotonic) in &app.monotonics { let instants = util::monotonic_instants_ident(name, &monotonic.ident); - let instants = util::mark_internal_ident(&instants); let mono_type = &monotonic.ty; let uninit = mk_uninit(); @@ -82,7 +80,6 @@ pub fn codegen( let uninit = mk_uninit(); let inputs_ident = util::inputs_ident(name); - let inputs_ident = util::mark_internal_ident(&inputs_ident); mod_app.push(quote!( #uninit // /// Buffer that holds the inputs of a task -- cgit v1.2.3