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
Place
represents how a value is located in memory. This does not always correspond to a syntactic place expression. For example, when processing a pattern, aPlace
can be used to refer to the sub-value currently being inspected. - Place
With HirId - A
PlaceWithHirId
represents how a value is located in memory. This does not always correspond to a syntactic place expression. For example, when processing a pattern, aPlace
can 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
ExprUseVisitor
usable with bothFnCtxt
andLateContext
, depending on where in the compiler it is used.