diff options
author | 2020-10-05 20:19:52 +0200 | |
---|---|---|
committer | 2020-10-05 20:19:52 +0200 | |
commit | 8ab7be98714d1ef6298e6feb19f16b84cd9bb4e6 (patch) | |
tree | 4febd53f9ba370a40e3ee0f3630a3542d1be4964 /macros/src | |
parent | 44f26fe90c2b49f3a30c507bf930b6bedc283a9c (diff) | |
download | rtic-8ab7be98714d1ef6298e6feb19f16b84cd9bb4e6.tar.gz rtic-8ab7be98714d1ef6298e6feb19f16b84cd9bb4e6.tar.zst rtic-8ab7be98714d1ef6298e6feb19f16b84cd9bb4e6.zip |
Added back accidentally removed block
Diffstat (limited to 'macros/src')
-rw-r--r-- | macros/src/codegen/init.rs | 6 | ||||
-rw-r--r-- | macros/src/lib.rs | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/macros/src/codegen/init.rs b/macros/src/codegen/init.rs index 1ced68bc..8942439b 100644 --- a/macros/src/codegen/init.rs +++ b/macros/src/codegen/init.rs @@ -63,6 +63,12 @@ pub fn codegen( } )); + let name_late = format_ident!("{}LateResources", name); + user_init_imports.push(quote!( + #[allow(non_snake_case)] + use super::#name_late; + )); + let mut locals_pat = None; let mut locals_new = None; if !init.locals.is_empty() { diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 94e7eec6..e659559e 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -35,8 +35,7 @@ mod tests; /// /// The items allowed in the module block are specified below: /// -/// # 1. `#[resources] -/// struct <resource-name>` +/// # 1. `#[resources] struct <resource-name>` /// /// This structure contains the declaration of all the resources used by the application. Each field /// in this structure corresponds to a different resource. Each resource may optionally be given an |