[][src]Module rustc_middle::mir

MIR datatypes and passes. See the rustc dev guide for more info.

Re-exports

pub use terminator::*;

Modules

abstract_const

A subset of a mir body used for const evaluatability checking.

binding_form_impl
coverage

Metadata from source code coverage analysis and instrumentation.

interpret

An interpreter for MIR used in CTFE and by miri.

mono
predecessors

Lazily compute the reverse control-flow graph for the MIR.

query

Values computed by queries that use MIR.

tcx

Methods for the various MIR types. These are intended for use after building is complete.

terminator
traversal
type_foldable

TypeFoldable implementations for MIR types

visit

Structs

BasicBlock

A node in the MIR control-flow graph.

BasicBlockData

See BasicBlock for documentation on what basic blocks are at a high level.

BlockTailInfo

BlockTailInfo is attached to the LocalDecl for temporaries created during evaluation of expressions in a block tail expression; that is, a block like { STMT_1; STMT_2; EXPR }.

Body

The lowered representation of a single function.

BorrowCheckResult
ClosureOutlivesRequirement

Indicates an outlives-constraint between a type or between two free regions declared on the closure.

ClosureRegionRequirements

After we borrow check a closure, we are left with various requirements that we have inferred between the free regions that appear in the closure's signature or on its field types. These requirements are then verified and proved by the closure's creating function. This struct encodes those requirements.

ConstQualifs

The result of the mir_const_qualif query.

Constant

Constants

Coverage
CoverageInfo

Coverage information summarized from a MIR if instrumented for source code coverage (see compiler option -Zinstrument-coverage). This information is generated by the InstrumentCoverage MIR pass and can be retrieved via the coverageinfo query.

DestructuredConst

The constituent parts of an ADT or array.

Field
GeneratorLayout

The layout of generator state.

GeneratorSavedLocal
LlvmInlineAsm
Local
LocalDecl

A MIR local.

Location

Location represents the position of the start of the statement; or, if statement_index equals the number of statements, then the start of the terminator.

MirSource

Where a specific mir::Body comes from.

Place

A path to a value; something that can be evaluated without changing or disturbing program state.

PlaceRef
Promoted
SourceInfo

Grouped information about the source code origin of a MIR entity. Intended to be inspected by diagnostics and debuginfo. Most passes can work with it as a whole, within a single function.

SourceScope
SourceScopeData
SourceScopeLocalData
Statement
UnsafetyCheckResult
UnsafetyViolation
UserTypeProjection

Encodes the effect of a user-supplied type annotation on the subcomponents of a pattern. The effect is determined by applying the given list of proejctions to some underlying base type. Often, the projection element list projs is empty, in which case this directly encodes a type in base. But in the case of complex patterns with subpatterns and bindings, we want to apply only a part of the type to a variable, in which case the projs vector is used.

UserTypeProjections

A collection of projections into user types.

VarBindingForm
VarDebugInfo

Debug information pertaining to a user variable.

Enums

AggregateKind
AssertKind

Information about an assertion failure.

BinOp
BindingForm
BorrowKind
CastKind
ClearCrossCrate
ClosureOutlivesSubject

The subject of a ClosureOutlivesRequirement -- that is, the thing that must outlive some region.

ConstraintCategory

Outlives-constraints can be categorized to determine whether and why they are interesting (for error reporting). Order of variants indicates sort order of the category, thereby influencing diagnostic output.

FakeReadCause

The FakeReadCause describes the type of pattern why a FakeRead statement exists.

ImplicitSelfKind

Represents what type of implicit self a function has, if any.

InlineAsmOperand
LocalInfo

Extra information about a some locals that's used for diagnostics and for classifying variables into local variables, statics, etc, which is needed e.g. for unsafety checking.

LocalKind

Classifies locals into categories. See Body::local_kind.

MirPhase

The various "big phases" that MIR goes through.

Mutability
NullOp
Operand

These are values that can appear inside an rvalue. They are intentionally limited to prevent rvalues from being nested in one another.

ProjectionElem
RetagKind

Describes what kind of retag is to be performed.

ReturnConstraint
Rvalue

Rvalues

Safety
StatementKind
UnOp
UnsafetyViolationDetails
UnsafetyViolationKind

Constants

OUTERMOST_SOURCE_SCOPE
RETURN_PLACE
START_BLOCK
TAG_CLEAR_CROSS_CRATE_CLEAR
TAG_CLEAR_CROSS_CRATE_SET

Traits

HasLocalDecls

Functions

pretty_print_const

Type Definitions

AssertMessage

Type for MIR Assert terminator error messages.

LocalDecls

Types for locals

PlaceElem

Alias for projections as they appear in places, where the base is a place and the index is a local.

ProjectionKind

Alias for projections as they appear in UserTypeProjection, where we need neither the V parameter for Index nor the T for Field.

Successors
SuccessorsMut