Module rustc_mir_build::thir[−][src]

The MIR is built from some typed high-level IR (THIR). This section defines the THIR along with a trait for accessing it. The intention is to allow MIR construction to be unit-tested and separated from the Rust source and compiler data structures.

Modules

arena
constant
cx

This module contains the functionality to convert from the wacky tcx data structures into the THIR. The builder is generally ignorant of the tcx, etc., and instead goes through the Cx for most of its work.

pattern

Validation of patterns/matches.

util

Structs

Arena
Arm
Ascription
Block
Expr

The Thir trait implementor lowers their expressions (&'tcx H::Expr) into instances of this Expr enum. This lowering can be done basically as lazily or as eagerly as desired: every recursive reference to an expression in this enum is an &'thir Expr<'thir, 'tcx>, which may in turn be another instance of this enum (boxed), or else an unlowered &'tcx H::Expr. Note that instances of Expr are very short-lived. They are created by Thir::to_expr, analyzed and converted into MIR, and then discarded.

FieldExpr
FieldPat
FruInfo
Pat
PatRange
PatTyProj
Stmt

Enums

BindingMode
BlockSafety
ExprKind
Guard
InlineAsmOperand
LintLevel
LogicalOp
PatKind
StmtKind

Functions

build_thir