rustc_middle::mir

Module syntax

Source
Expand description

This defines the syntax of MIR, i.e., the set of available MIR operations, and other definitions closely related to MIR semantics. This is in a dedicated file so that changes to this file can be reviewed more carefully. The intention is that this file only contains datatype declarations, no code.

Modules§

size_asserts 🔒

Structs§

ConstOperand
CopyNonOverlapping
Place
Places roughly correspond to a “location in memory.” Places in MIR are the same mathematical object as places in Rust. This of course means that what exactly they are is undecided and part of the Rust memory model. However, they will likely contain at least the following pieces of information in some form:
SwitchTargets

Enums§

AggregateKind
AnalysisPhase
See MirPhase::Analysis.
AssertKind
Information about an assertion failure.
BackwardIncompatibleDropReason
BinOp
BorrowKind
CallSource
Represents how a TerminatorKind::Call was constructed. Used only for diagnostics.
CastKind
CoercionSource
Represents how a CastKind::PointerCoercion was constructed. Used only for diagnostics.
FakeBorrowKind
FakeReadCause
The FakeReadCause describes the type of pattern why a FakeRead statement exists.
InlineAsmMacro
The macro that an inline assembly block was created by
InlineAsmOperand
MirPhase
Represents the “flavors” of MIR.
MutBorrowKind
NonDivergingIntrinsic
NullOp
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.
ProjectionElem
RetagKind
Describes what kind of retag is to be performed.
RuntimePhase
See MirPhase::Runtime.
Rvalue
The various kinds of rvalues that can appear in MIR.
StatementKind
The various kinds of statements that can appear in MIR.
TerminatorKind
The various kinds of terminators, representing ways of exiting from a basic block.
UnOp
UnwindAction
Action to be taken when a stack unwind happens.
UnwindTerminateReason
The reason we are terminating the process during unwinding.

Type Aliases§

AssertMessage
Type for MIR Assert terminator error messages.
PlaceElem
Alias for projections as they appear in places, where the base is a place and the index is a local.