diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-05 18:26:00 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-05 18:26:00 +0000 |
| commit | 12aa9807c4883e1c8b3f226acea3a6aa5e886989 (patch) | |
| tree | 4febd53f9ba370a40e3ee0f3630a3542d1be4964 /macros/src/codegen/module.rs | |
| parent | f493f21359ccb3ab4643d9470f3581532f47593a (diff) | |
| parent | 8ab7be98714d1ef6298e6feb19f16b84cd9bb4e6 (diff) | |
Merge #372
372: Now late resources are always used r=AfoHT a=korken89
Awaits the PR in `rtic-syntax`: https://github.com/rtic-rs/rtic-syntax/pull/32
Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Diffstat (limited to 'macros/src/codegen/module.rs')
| -rw-r--r-- | macros/src/codegen/module.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/macros/src/codegen/module.rs b/macros/src/codegen/module.rs index 359c1cc..2e51e7d 100644 --- a/macros/src/codegen/module.rs +++ b/macros/src/codegen/module.rs @@ -261,14 +261,12 @@ pub fn codegen(ctxt: Context, resources_tick: bool, app: &App, extra: &Extra) -> if let Context::Init = ctxt { let init = &app.inits.first().unwrap(); - if init.returns_late_resources { - let late_resources = util::late_resources_ident(&init.name); + let late_resources = util::late_resources_ident(&init.name); - items.push(quote!( - #[doc(inline)] - pub use super::#late_resources as LateResources; - )); - } + items.push(quote!( + #[doc(inline)] + pub use super::#late_resources as LateResources; + )); } let doc = match ctxt { |
