[pdm-devel] [PATCH proxmox 01/13] api-macro: allow $ in identifier name

Christoph Heiss c.heiss at proxmox.com
Thu Dec 4 13:51:10 CET 2025


This allows dollar-sign in renamed field names for API types.

Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
---
 proxmox-api-macro/src/util.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxmox-api-macro/src/util.rs b/proxmox-api-macro/src/util.rs
index 9ed3fa0b..20a4d53b 100644
--- a/proxmox-api-macro/src/util.rs
+++ b/proxmox-api-macro/src/util.rs
@@ -30,7 +30,7 @@ pub struct FieldName {
 
 impl FieldName {
     pub fn new(name: String, span: Span) -> Self {
-        let mut ident_str = name.replace(['-', '.', '+'].as_ref(), "_");
+        let mut ident_str = name.replace(['-', '.', '+', '$'].as_ref(), "_");
 
         if ident_str.chars().next().unwrap().is_numeric() {
             ident_str.insert(0, '_');
-- 
2.51.2





More information about the pdm-devel mailing list