aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/util.rs
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2020-12-03 21:04:06 +0100
committerGravatar Emil Fresk <emil.fresk@gmail.com> 2020-12-03 21:04:06 +0100
commitef50aeb2e8245b69843280fabb62589c0716ffdd (patch)
treea159de70654135eb87c52629c6026766eac3bff0 /macros/src/codegen/util.rs
parent3b4c10e790e63ac328a7bdb98451ac11d5935731 (diff)
downloadrtic-ef50aeb2e8245b69843280fabb62589c0716ffdd.tar.gz
rtic-ef50aeb2e8245b69843280fabb62589c0716ffdd.tar.zst
rtic-ef50aeb2e8245b69843280fabb62589c0716ffdd.zip
Save, init generation fixed
Diffstat (limited to 'macros/src/codegen/util.rs')
-rw-r--r--macros/src/codegen/util.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/macros/src/codegen/util.rs b/macros/src/codegen/util.rs
index fb8f1a84..4273ee2c 100644
--- a/macros/src/codegen/util.rs
+++ b/macros/src/codegen/util.rs
@@ -111,6 +111,14 @@ pub fn late_resources_ident(init: &Ident) -> Ident {
)
}
+/// Generates a pre-reexport identifier for the "monotonics" struct
+pub fn monotonics_ident(init: &Ident) -> Ident {
+ Ident::new(
+ &format!("{}Monotonics", init.to_string()),
+ Span::call_site(),
+ )
+}
+
/// Mangle an ident
pub fn mangle_ident(ident: &Ident) -> Ident {
Ident::new(