aboutsummaryrefslogtreecommitdiff
path: root/macros/src/lib.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2019-04-21 20:02:59 +0200
committerGravatar Jorge Aparicio <jorge@japaric.io> 2019-05-01 20:49:25 +0200
commita452700628e352e6ac01da9e16223a47752ca860 (patch)
treec04a58222ba95e59d6b6013b5d2314068de6b1d0 /macros/src/lib.rs
parente6fb2f216fccc09d8e996525dcef3ffb2004f1ec (diff)
downloadrtic-a452700628e352e6ac01da9e16223a47752ca860.tar.gz
rtic-a452700628e352e6ac01da9e16223a47752ca860.tar.zst
rtic-a452700628e352e6ac01da9e16223a47752ca860.zip
implement RFCs 147 and 155, etc.
This commit: - Implements RFC 147: "all functions must be safe" - Implements RFC 155: "explicit Context parameter" - Implements the pending breaking change #141: reject assign syntax in `init` (which was used to initialize late resources) - Refactors code generation to make it more readable -- there are no more random identifiers in the output -- and align it with the book description of RTFM internals. - Makes the framework hard depend on `core::mem::MaybeUninit` and thus will require nightly until that API is stabilized. - Fixes a ceiling analysis bug where the priority of the system timer was not considered in the analysis. - Shrinks the size of all the internal queues by turning `AtomicUsize` indices into `AtomicU8`s. - Removes the integration with `owned_singleton`.
Diffstat (limited to '')
-rw-r--r--macros/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/macros/src/lib.rs b/macros/src/lib.rs
index c8d9fee1..441d6b5e 100644
--- a/macros/src/lib.rs
+++ b/macros/src/lib.rs
@@ -288,9 +288,9 @@ mod syntax;
pub fn app(args: TokenStream, input: TokenStream) -> TokenStream {
// Parse
let args = parse_macro_input!(args as syntax::AppArgs);
- let items = parse_macro_input!(input as syntax::Input).items;
+ let input = parse_macro_input!(input as syntax::Input);
- let app = match syntax::App::parse(items, args) {
+ let app = match syntax::App::parse(input.items, args) {
Err(e) => return e.to_compile_error().into(),
Ok(app) => app,
};
@@ -304,5 +304,5 @@ pub fn app(args: TokenStream, input: TokenStream) -> TokenStream {
let analysis = analyze::app(&app);
// Code generation
- codegen::app(&app, &analysis).into()
+ codegen::app(&input.ident, &app, &analysis).into()
}