diff options
author | 2021-08-20 06:50:43 +0000 | |
---|---|---|
committer | 2021-08-20 06:50:43 +0000 | |
commit | f77b81e0eec2fa9053911d84f02b9a78b84486ec (patch) | |
tree | c39efb7e0259faef3f9ca03ac87b9d525c1e6093 /macros/src/codegen/local_resources_struct.rs | |
parent | 3bf5a4f7a06fdb5d341d900c3e937d4c9afd2dda (diff) | |
parent | cdbd8a2cede668e1181030bd7c439592a8f0e980 (diff) | |
download | rtic-f77b81e0eec2fa9053911d84f02b9a78b84486ec.tar.gz rtic-f77b81e0eec2fa9053911d84f02b9a78b84486ec.tar.zst rtic-f77b81e0eec2fa9053911d84f02b9a78b84486ec.zip |
Merge #515
515: `mark_internal_ident` cleanup r=korken89 a=datdenkikniet
Refactor so that all `idents` that had to call `mark_ident_internal` before now call `mark_name_internal` in the `util` module by default.
The commits can (and probably should) be squashed, they're separated for clarity.
Fixes #512
Co-authored-by: datdenkikniet <jcdra1@gmail.com>
Diffstat (limited to 'macros/src/codegen/local_resources_struct.rs')
-rw-r--r-- | macros/src/codegen/local_resources_struct.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/macros/src/codegen/local_resources_struct.rs b/macros/src/codegen/local_resources_struct.rs index d59918d7..cdbfccca 100644 --- a/macros/src/codegen/local_resources_struct.rs +++ b/macros/src/codegen/local_resources_struct.rs @@ -44,11 +44,9 @@ pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2, }; let mangled_name = if matches!(task_local, TaskLocal::External) { - util::mark_internal_ident(&util::static_local_resource_ident(name)) + util::static_local_resource_ident(name) } else { - util::mark_internal_ident(&util::declared_static_local_resource_ident( - name, &task_name, - )) + util::declared_static_local_resource_ident(name, &task_name) }; fields.push(quote!( @@ -86,7 +84,6 @@ pub fn codegen(ctxt: Context, needs_lt: &mut bool, app: &App) -> (TokenStream2, let doc = format!("Local resources `{}` has access to", ctxt.ident(app)); let ident = util::local_resources_ident(ctxt, app); - let ident = util::mark_internal_ident(&ident); let item = quote!( #[allow(non_snake_case)] #[allow(non_camel_case_types)] |