Module expr_use_visitor

Source
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§

ExprUseVisitor
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, a Place can be used to refer to the sub-value currently being inspected.
PlaceWithHirId
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, a Place can be used to refer to the sub-value currently being inspected.
Projection

Enums§

PlaceBase

Traits§

Delegate
This trait defines the callbacks you can expect to receive when employing the ExprUseVisitor.
TypeInformationCtxt
This trait makes ExprUseVisitor usable with both FnCtxt and LateContext, depending on where in the compiler it is used.