[][src]Module syntax::mut_visit

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A MutVisitor represents an AST modification; it accepts an AST piece and 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.

Traits

ExpectOneInternal
MutVisitorInternal

Functions

noop_filter_map_exprInternal
noop_flat_map_armInternal
noop_flat_map_fieldInternal
noop_flat_map_field_patternInternal
noop_flat_map_foreign_itemInternal
noop_flat_map_generic_paramInternal
noop_flat_map_impl_itemInternal
noop_flat_map_itemInternal
noop_flat_map_paramInternal
noop_flat_map_stmtInternal
noop_flat_map_stmt_kindInternal
noop_flat_map_struct_fieldInternal
noop_flat_map_trait_itemInternal
noop_flat_map_variantInternal
noop_visit_angle_bracketed_parameter_dataInternal
noop_visit_anon_constInternal
noop_visit_asyncnessInternal
noop_visit_attributeInternal
noop_visit_blockInternal
noop_visit_crateInternal
noop_visit_exprInternal
noop_visit_fn_declInternal
noop_visit_fn_headerInternal
noop_visit_foreign_modInternal
noop_visit_generic_argInternal
noop_visit_generic_argsInternal
noop_visit_genericsInternal
noop_visit_identInternal
noop_visit_interpolatedInternal

Applies the visitor to elements of interpolated nodes.

noop_visit_item_kindInternal
noop_visit_labelInternal
noop_visit_lifetimeInternal
noop_visit_localInternal
noop_visit_macInternal
noop_visit_macro_defInternal
noop_visit_meta_itemInternal
noop_visit_meta_list_itemInternal
noop_visit_modInternal
noop_visit_mtInternal
noop_visit_param_boundInternal
noop_visit_parenthesized_parameter_dataInternal
noop_visit_patInternal
noop_visit_pathInternal
noop_visit_poly_trait_refInternal
noop_visit_qselfInternal
noop_visit_tokenInternal
noop_visit_trait_refInternal
noop_visit_ttInternal
noop_visit_ttsInternal
noop_visit_tyInternal
noop_visit_ty_constraintInternal
noop_visit_use_treeInternal
noop_visit_variant_dataInternal
noop_visit_visInternal
noop_visit_where_clauseInternal
noop_visit_where_predicateInternal
visit_attrsInternal
visit_boundsInternal
visit_clobberInternal

Use a map-style function (FnOnce(T) -> T) to overwrite a &mut T. Useful when using a flat_map_* or filter_map_* method within a visit_ method. Abort the program if the closure panics.

visit_exprsInternal
visit_fn_sigInternal
visit_optInternal
visit_thin_attrsInternal
visit_vecInternal