Skip to main content

SubstituteRef

Function SubstituteRef 

Source
pub fn SubstituteRef(
    Stmts: &mut [Stmt],
    Target: &str,
    Replacement: &Expr,
) -> bool
Expand description

Replace the first occurrence of Target (as a plain identifier expression OR as an identifier token inside a macro’s token stream) in Stmts with Replacement. Returns true when the substitution was performed.