diff options
| author | Johannes Cornelis Draaijer <johannes.draaijer@kiteshield.com> | 2025-09-03 13:53:50 +0200 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2025-09-17 19:40:38 +0200 |
| commit | 3ba1632f8d8e4c5564de282ad359e33151956bb6 (patch) | |
| tree | 6866e77ac14cfd12b124fa564c0faa9c180d1c29 /rtic-macros/src/syntax/ast.rs | |
| parent | fa2c8c1dcdd74bd7e4268845a671e2ed146d0c1b (diff) | |
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.
Diffstat (limited to 'rtic-macros/src/syntax/ast.rs')
| -rw-r--r-- | rtic-macros/src/syntax/ast.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rtic-macros/src/syntax/ast.rs b/rtic-macros/src/syntax/ast.rs index ad73a89..44c1385 100644 --- a/rtic-macros/src/syntax/ast.rs +++ b/rtic-macros/src/syntax/ast.rs @@ -1,6 +1,6 @@ //! Abstract Syntax Tree -use syn::{Attribute, Expr, Ident, Item, ItemUse, Pat, PatType, Path, Stmt, Type}; +use syn::{Attribute, Expr, Ident, Item, ItemUse, Meta, Pat, PatType, Path, Stmt, Type}; use crate::syntax::{backend::BackendArgs, Map}; @@ -11,6 +11,9 @@ pub struct App { /// The arguments to the `#[app]` attribute pub args: AppArgs, + /// All attributes applied to the `#[app]` module (meta only) + pub attribute_metas: Vec<Meta>, + /// The name of the `const` item on which the `#[app]` attribute has been placed pub name: Ident, |
