Skip to main content

Module mir

Module mir 

Expand description

MIR definitions and implementation

Structs§

BasicBlock
BorrowckResult
Evaluator
FieldIndex
The index of a field (whether of a struct/enum variant, tuple, or closure). For a struct/enum it converts from and to the LocalFieldId, for a tuple or closure it’s simply the index.
Local
MirBody
Operand
An operand in MIR represents a “value” in Rust, the definition of which is undecided and part of the memory model. One proposal for a definition of values can be found on UCG.
Place
PlaceRef
PlaceTy
To determine the type of a place, we need to keep track of the variant that has been downcast to, in order to find the correct fields. This type does that.
Projection
ProjectionStorage
Statement
StoredProjection
SwitchTargets
Terminator
VTableMap

Enums§

AggregateKind
BinOp
BorrowKind
CastKind
MirEvalError
MirLowerError
MirSpan
MutBorrowKind
MutabilityReason
Stores spans which implies that the local should be mutable.
OperandKind
ProjectionElem
Rvalue
StatementKind
TerminatorKind
UnOp

Functions§

borrowck_query
interpret_mir
lower_body_to_mir
Extracts params from body.params/body.self_param and the callable signature, then delegates to lower_to_mir_with_store.
lower_to_mir_with_store
Parameters
mir_body_for_closure_query
mir_body_query
monomorphized_mir_body_for_closure_query
monomorphized_mir_body_query
pad16
render_const_using_debug_impl

Type Aliases§

BasicBlockId
LocalId