Skip to main content

normalize_r_arg_ident

Function normalize_r_arg_ident 

Source
pub fn normalize_r_arg_ident(rust_ident: &Ident) -> Ident
Expand description

Normalizes Rust argument identifiers for R.

  • Leading _ → stripped (Rust convention for unused params)
  • Leading __ → stripped
  • Otherwise → unchanged

§Examples

  • _xx
  • _toto
  • __fieldfield
  • valuevalue

Note: We strip underscores rather than prefixing “unused” because R callers (like vctrs) may use named arguments that must match the original name.