Expand description
A different sort of visitor for walking fn bodies. Unlike the
normal visitor, which just walks the entire body in one shot, the
ExprUseVisitor determines how expressions are being used.
In the compiler, this is only used for upvar inference, but there are many uses within clippy.
Structs§
- Expr
UseVisitor - A visitor that reports how each expression is being used.
- Place
- A
Placerepresents how a value is located in memory. This does not always correspond to a syntactic place expression. For example, when processing a pattern, aPlacecan be used to refer to the sub-value currently being inspected. - Place
With HirId - A
PlaceWithHirIdrepresents how a value is located in memory. This does not always correspond to a syntactic place expression. For example, when processing a pattern, aPlacecan be used to refer to the sub-value currently being inspected. - Projection
Enums§
Traits§
- Delegate
- This trait defines the callbacks you can expect to receive when employing the ExprUseVisitor.
- Type
Information Ctxt - This trait makes
ExprUseVisitorusable with bothFnCtxtandLateContext, depending on where in the compiler it is used.