Module rustc_mir::build[][src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Modules

block [
Experimental
]
cfg [
Experimental
]

Routines for manipulating the control-flow graph.

expr [
Experimental
]

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 [
Experimental
]

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 [
Experimental
]

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 [
Experimental
]

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

scope [
Experimental
]

Managing the scope stack. The scopes are tied to lexical scopes, so as we descend the HAIR, 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 [
Experimental
]
BlockAnd [
Experimental
]

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.

Builder [
Experimental
]
CFG [
Experimental
]
GlobalizeMir [
Experimental
]

A pass to lift all the types and substitutions in a Mir to the global tcx. Sadly, we don't have a "folder" that can change 'tcx so we have to transmute afterwards.

GuardFrame [
Experimental
]
GuardFrameLocal [
Experimental
]
ImplicitSelfBinding [
Experimental
]

the main entry point for building MIR for a function

ScopeId [
Experimental
]

Enums

ForGuard [
Experimental
]

ForGuard indicates whether we are talking about:

LocalsForNode [
Experimental
]

Traits

BlockAndExtension [
Experimental
]

Functions

construct_const [
Experimental
]
construct_error [
Experimental
]
construct_fn [
Experimental
]
create_constructor_shim [
Experimental
]
liberated_closure_env_ty [
Experimental
]
mir_build [
Experimental
]

Construct the MIR for a given def-id.

should_abort_on_panic [
Experimental
]