mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 22:05:37 +01:00
rtic-macros: forward attributes applied to app module
Instead of ignoring additional attributes applied to the app module, we can forward them to the generated code.
This commit is contained in:
parent
fa2c8c1dcd
commit
3ba1632f8d
8 changed files with 78 additions and 2 deletions
|
|
@ -44,12 +44,14 @@ pub fn app(app: &App, analysis: &Analysis) -> TokenStream2 {
|
|||
let user_code = &app.user_code;
|
||||
let name = &app.name;
|
||||
let device = &app.args.device;
|
||||
let attribute_metas = &app.attribute_metas;
|
||||
|
||||
let rt_err = util::rt_err_ident();
|
||||
let async_limit = bindings::async_prio_limit(app, analysis);
|
||||
|
||||
quote!(
|
||||
/// The RTIC application module
|
||||
#(#[#attribute_metas])*
|
||||
pub mod #name {
|
||||
/// Always include the device crate which contains the vector table
|
||||
use #device as #rt_err;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue