Skip to main content

Module expr_use_visitor

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.

This is only used for upvar inference.

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.
PlaceWithOrigin ๐Ÿ”’
A PlaceWithOrigin 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ยง

CatPatternPat ๐Ÿ”’
FakeReadCause
The FakeReadCause describes the type of pattern why a FakeRead statement exists.
PlaceBase
ProjectionKind

Traitsยง

Delegate ๐Ÿ”’
This trait defines the callbacks you can expect to receive when employing the ExprUseVisitor.

Type Aliasesยง

Result ๐Ÿ”’