[PATCH proxmox v3 01/38] api-macro: allow $ in identifier name

Christoph Heiss
2026-04-03T16:54:53Z

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

Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
Changes v2 -> v3:
* no changes

Changes v1 -> v2:
* no changes

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 db2acdf2..df2b6da8 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.53.0