diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2020-10-15 18:50:17 +0200 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2020-10-21 20:25:05 +0200 |
| commit | f96b25fdf2d7421cc16830a4ccac4ebb3e69cc5d (patch) | |
| tree | a782f21ca0659eda6b9b667e197c4927490a7bc4 /macros/src/codegen/util.rs | |
| parent | 355cb82d0693fe108ac28ec8a0d77e8aab4e6e06 (diff) | |
Updated examples
More work
Diffstat (limited to 'macros/src/codegen/util.rs')
| -rw-r--r-- | macros/src/codegen/util.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/macros/src/codegen/util.rs b/macros/src/codegen/util.rs index f04ccb2..887ee3b 100644 --- a/macros/src/codegen/util.rs +++ b/macros/src/codegen/util.rs @@ -106,6 +106,14 @@ pub fn late_resources_ident(init: &Ident) -> Ident { ) } +/// Mangle an ident +pub fn mangle_ident(ident: &Ident) -> Ident { + Ident::new( + &format!("__rtic_internal_{}", ident.to_string()), + Span::call_site(), + ) +} + fn link_section_index() -> usize { static INDEX: AtomicUsize = AtomicUsize::new(0); |
