Skip to main content

expr_uses_ident

Function expr_uses_ident 

Source
pub fn expr_uses_ident(expr: &Expr, name: &str) -> bool
Expand description

True if any sub-expression references name as a bare identifier. Walks the AST without compiling. Shadowing by inner let / lambda / comprehension binders is respected: inner bindings with the same name hide the outer one.