pub trait AstMap<'a> {
// Required method
fn arenas(&self) -> Arenas<'a>;
// Provided methods
fn map_expr(&mut self, e: &'a Expr<'a>) -> &'a Expr<'a> { ... }
fn map_stmt(&mut self, s: &Stmt<'a>) -> Stmt<'a> { ... }
fn map_type(&mut self, t: &'a TypeExpr<'a>) -> &'a TypeExpr<'a> { ... }
fn map_arm(&mut self, arm: &MatchArm<'a>) -> MatchArm<'a> { ... }
fn map_block(&mut self, block: &'a [Stmt<'a>]) -> &'a [Stmt<'a>] { ... }
}Expand description
A rewriting pass over the imperative AST. Each hook’s default rebuilds the node from its mapped children.