Skip to main content

replace_const

Function replace_const 

Source
pub fn replace_const(expr: &Expr, name: &Name, replacement: &Expr) -> Expr
Expand description

Replace all occurrences of a constant by another expression.

Traverses the expression and substitutes replacement for every Const(name, _) node.