Module mir
Expand description
MIR definitions and implementation
Structs§
- Basic
Block - Borrowck
Result - Evaluator
- Field
Index - 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
- Place
Ref - 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
- Projection
Storage - Statement
- Stored
Projection - Switch
Targets - Terminator
- VTable
Map
Enums§
- Aggregate
Kind - BinOp
- Borrow
Kind - Cast
Kind - MirEval
Error - MirLower
Error - MirSpan
- MutBorrow
Kind - Mutability
Reason - Stores spans which implies that the local should be mutable.
- Operand
Kind - Projection
Elem - Rvalue
- Statement
Kind - Terminator
Kind - UnOp
Functions§
- borrowck_
query - interpret_
mir - lower_
body_ to_ mir - Extracts params from
body.params/body.self_paramand the callable signature, then delegates tolower_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