diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2021-11-11 14:22:47 +0100 |
|---|---|---|
| committer | Emil Fresk <emil.fresk@gmail.com> | 2021-11-11 14:22:47 +0100 |
| commit | 6f2aa08910cbe7c41ae877bdbf6eb3dc3cad5f22 (patch) | |
| tree | 1adb489563769d5e3bda7d698baac33d31d9b092 /macros/src/codegen/util.rs | |
| parent | 6466aec406ccb20bc9f7b2b31fa5ab9e2501c2e7 (diff) | |
Better errors on when missing to lock shared resources
Diffstat (limited to 'macros/src/codegen/util.rs')
| -rw-r--r-- | macros/src/codegen/util.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/macros/src/codegen/util.rs b/macros/src/codegen/util.rs index 8e40ad6..831718a 100644 --- a/macros/src/codegen/util.rs +++ b/macros/src/codegen/util.rs @@ -268,6 +268,13 @@ pub fn declared_static_local_resource_ident(name: &Ident, task_name: &Ident) -> )) } +pub fn need_to_lock_ident(name: &Ident) -> Ident { + Ident::new( + &format!("{}_that_needs_to_be_locked", name.to_string()), + name.span(), + ) +} + /// The name to get better RT flag errors pub fn rt_err_ident() -> Ident { Ident::new( |
