Expand description
Core MIR types: Place, Statement, Terminator, BasicBlock.
These represent the mid-level IR that the borrow solver operates on. Places track what can be borrowed (locals, fields, indices). Statements and terminators form basic blocks in a control flow graph.
Structs§
- Basic
Block - A basic block: a sequence of statements ending in a terminator.
- Basic
Block Id - Index of a basic block within a MIR function.
- Field
Idx - Index of a struct/object field.
- LoanId
- Unique identifier for a loan (borrow).
- MirFunction
- The MIR representation of a single function.
- MirStatement
- A statement within a basic block (doesn’t affect control flow).
- Point
- A program point (statement index within the function’s linearized MIR). Used as the “point” dimension in Datafrog relations.
- SlotId
- Index of a local variable slot.
- Terminator
- A block terminator (controls flow between basic blocks).
Enums§
- BinOp
- Binary operations in MIR.
- Borrow
Kind - The kind of borrow.
- Local
Type Info - Type information for a local variable, used for Copy/Clone inference.
- MirConstant
- A constant value in MIR.
- Operand
- An operand in an Rvalue or terminator.
- Place
- A place is something that can be borrowed or assigned to. Tracks granular access paths for disjoint borrow analysis.
- Rvalue
- Right-hand side of an assignment.
- Statement
Kind - Terminator
Kind - UnOp
- Unary operations in MIR.