[−][src]Module rustc_mir_build::build

Modules

block
cfg

Routines for manipulating the control-flow graph.

expr

Builds MIR from expressions. As a caller into this module, you have many options, but the first thing you have to decide is whether you are evaluating this expression for its value, its location, or as a constant.

into

In general, there are a number of things for which it's convenient to just call builder.into and have it emit its result into a given location. This is basically for expressions or things that can be wrapped up as expressions (e.g., blocks). To make this ergonomic, we use this latter EvalInto trait.

matches

Code related to match expressions. These are sufficiently complex to warrant their own module and submodules. :) This main module includes the high-level algorithm, the submodules contain the details.

misc

Miscellaneous builder routines that are not specific to building any particular kind of thing.

scope

Managing the scope stack. The scopes are tied to lexical scopes, so as we descend the THIR, we push a scope on the stack, build its contents, and then pop it off. Every scope is named by a region::Scope.

Structs

ArgInfo

the main entry point for building MIR for a function

BlockAnd

The BlockAnd "monad" packages up the new basic block along with a produced value (sometimes just unit, of course). The unpack! macro (and methods below) makes working with BlockAnd much more convenient.

BlockContext
Builder
CFG
GuardFrame
GuardFrameLocal
ScopeId

Enums

BlockFrame
ForGuard

ForGuard indicates whether we are talking about:

LocalsForNode

Traits

BlockAndExtension

Functions

construct_const
construct_error

Construct MIR for a item that has had errors in type checking.

construct_fn
liberated_closure_env_ty
mir_build

Construct the MIR for a given DefId.

mir_built
should_abort_on_panic