[−][src]Module c2rust_refactor::ast_manip
General-purpose AST manipulation utilities. Everything in here works strictly on the AST, with no reliance on HIR or TyCtxt information.
Modules
ast_map | |
fn_edit | Helpers for rewriting all |
lr_expr |
|
number_nodes | |
util | Miscellaneous utility functions. |
Traits
AstDeref | |
AstEquiv | Trait for checking equivalence of AST nodes. This is similar to |
AstName | |
FlatMapNodes | Trait for AST node types that can be rewritten with a flat_map. |
GetNodeId | Trait for obtaining the |
GetSpan | Trait for obtaining the |
ListNodeIds | |
MaybeGetNodeId | |
MutVisit | A trait for AST nodes that can accept a |
MutVisitNodes | Trait for AST node types that can be rewritten with a mutable visit. |
Visit | A trait for AST nodes that can accept a |
VisitNode | Trait for AST node types that can be visited. |
Functions
fold_blocks | Rewrite every block by manipulating a |
fold_modules | Rewrite every module by manipulating a |
fold_output_exprs | Rewrite function output/return expressions. |
remove_paren | |
visit_nodes | Visit nodes of the callback's argument type within |
visit_nodes_post | Visit nodes of the callback's argument type within |