Expand description
Defines two overrideable visitor traits that can be used to conveniently traverse the whole contents of an item. This is useful when e.g. dealing with types, which show up pretty much everywhere in the ast.
The crate defines two traits:
Structs§
- Implementation detail: wrapper that implements
Visit[Mut]<T>
forT: #trait_name
, and delegates all the visiting to our trait’sdrive[_mut]
. Used in the implementation ofvisit_inner
- Implementation detail: wrapper that implements
Visit[Mut]<T>
forT: #trait_name
, and delegates all the visiting to our trait’sdrive[_mut]
. Used in the implementation ofvisit_inner
- Ast and body visitor that uses dynamic dispatch to call the provided function on the visited values of the right type.
Traits§
- An overrideable visitor trait that can be used to conveniently traverse the whole contents of an item. This is useful when e.g. dealing with types, which show up pretty much everywhere in the ast.
- A smaller visitor group just for function bodies. This explores statements, places and operands, but does not recurse into types.