diff options
author | 2021-07-06 22:47:48 +0200 | |
---|---|---|
committer | 2021-07-06 22:47:48 +0200 | |
commit | ef5307d83a1d62df0569d78db75d4006147c927d (patch) | |
tree | 542ff46adf7600cbd7f908cb62ac3a44e1bfa683 /macros/src/codegen/local_resources_struct.rs | |
parent | 3f85cb5caf1ae930e6551e139978ceec859a2348 (diff) | |
download | rtic-ef5307d83a1d62df0569d78db75d4006147c927d.tar.gz rtic-ef5307d83a1d62df0569d78db75d4006147c927d.tar.zst rtic-ef5307d83a1d62df0569d78db75d4006147c927d.zip |
Minimal app now compiles
Diffstat (limited to 'macros/src/codegen/local_resources_struct.rs')
-rw-r--r-- | macros/src/codegen/local_resources_struct.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/macros/src/codegen/local_resources_struct.rs b/macros/src/codegen/local_resources_struct.rs index 3016f379..14706a5b 100644 --- a/macros/src/codegen/local_resources_struct.rs +++ b/macros/src/codegen/local_resources_struct.rs @@ -10,7 +10,7 @@ pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2, let resources = match ctxt { Context::Init => &app.init.args.local_resources, - Context::Idle => &app.idle.unwrap().args.local_resources, + Context::Idle => &app.idle.as_ref().unwrap().args.local_resources, Context::HardwareTask(name) => &app.hardware_tasks[name].args.local_resources, Context::SoftwareTask(name) => &app.software_tasks[name].args.local_resources, }; @@ -33,7 +33,7 @@ pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2, }; let ty = &res.ty; - let mangled_name = util::mark_internal_ident(&name); + let mangled_name = util::mark_internal_ident(&util::static_local_resource_ident(name)); fields.push(quote!( #(#cfgs)* |