From a452700628e352e6ac01da9e16223a47752ca860 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sun, 21 Apr 2019 20:02:59 +0200 Subject: 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`. --- macros/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'macros/src/lib.rs') diff --git a/macros/src/lib.rs b/macros/src/lib.rs index c8d9fee..441d6b5 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() } -- cgit v1.2.3