Expand description
A MutVisitor represents an AST modification; it accepts an AST piece and
mutates it in place. So, for instance, macro expansion is a MutVisitor
that walks over an AST and modifies it.
Note: using a MutVisitor (other than the MacroExpander MutVisitor) on
an AST before macro expansion is probably a bad idea. For instance,
a MutVisitor renaming item names in a module will miss all of those
that are created by the expansion of a macro.
ModulesΒ§
- sealed π
MacrosΒ§
- define_named_ πwalk 
- generate_flat_ πmap_ visitor_ fns 
- generate_walk_ πflat_ map_ fns 
- impl_visitable π
- impl_visitable_ πcalling_ walkable 
- impl_visitable_ πdirect 
- impl_visitable_ πlist 
- impl_visitable_ πnoop 
- impl_walkable π
- visit_visitable π
- visit_visitable_ πwith 
- walk_walkable π
EnumsΒ§
TraitsΒ§
- MutVisitable π
- MutVisitor
- Each method of this trait is a hook to be potentially
overridden. Each methodβs default implementation recursively visits
the substructure of the input via the corresponding walkmethod; e.g., thevisit_itemmethod by default callsvisit_mut::walk_item.
- MutWalkable
- WalkItem Kind 
FunctionsΒ§
- visit_arms π
- visit_assoc_ πitems 
- visit_expr_ πfields 
- visit_exprs π
- visit_field_ πdefs 
- visit_foreign_ πitems 
- visit_generic_ πparams 
- visit_items π
- visit_params π
- visit_pat_ πfields 
- visit_span π
- visit_stmts π
- visit_variants π
- visit_where_ πpredicates 
- walk_anon_ const 
- walk_arm 
- walk_assoc_ item 
- walk_assoc_ item_ constraint 
- walk_attribute 
- walk_block 
- walk_capture_ by 
- walk_closure_ binder 
- walk_contract 
- walk_coroutine_ kind 
- walk_crate 
- walk_expr 
- walk_expr_ field 
- walk_field_ def 
- walk_filter_ map_ expr 
- walk_flat_ map_ arm 
- walk_flat_ map_ assoc_ item 
- walk_flat_ map_ expr_ field 
- walk_flat_ map_ field_ def 
- walk_flat_ map_ foreign_ item 
- walk_flat_ map_ generic_ param 
- walk_flat_ map_ item 
- walk_flat_ map_ param 
- walk_flat_ map_ pat_ field 
- walk_flat_ map_ stmt 
- walk_flat_ πmap_ stmt_ kind 
- walk_flat_ map_ variant 
- walk_flat_ map_ where_ predicate 
- walk_fn
- walk_fn_ decl 
- walk_fn_ header 
- walk_fn_ ret_ ty 
- walk_foreign_ mod 
- walk_format_ args 
- walk_generic_ arg 
- walk_generic_ args 
- walk_generic_ param 
- walk_generics 
- walk_inline_ asm 
- walk_inline_ asm_ sym 
- walk_item 
- walk_item_ πinner 
- walk_label 
- walk_lifetime 
- walk_local 
- walk_mac 
- walk_macro_ def 
- walk_param 
- walk_param_ bound 
- walk_pat 
- walk_pat_ field 
- walk_path 
- walk_path_ segment 
- walk_poly_ trait_ ref 
- walk_precise_ capturing_ arg 
- walk_qself 
- walk_trait_ ref 
- walk_ty
- walk_ty_ pat 
- walk_use_ tree 
- walk_variant 
- walk_variant_ data 
- walk_vis 
- walk_where_ predicate 
- walk_where_ predicate_ kind