Module rustc_mir::borrow_check::nll[][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

constraint_generation [
Experimental
]
constraints [
Experimental
]
explain_borrow [
Experimental
]
facts [
Experimental
]
invalidation [
Experimental
]
liveness_map [
Experimental
]

For the NLL computation, we need to compute liveness, but only for those local variables whose types contain regions. The others are not of interest to us. This file defines a new index type (LocalWithRegion) that indexes into a list of "variables whose type contain regions". It also defines a map from Local to LocalWithRegion and vice versa -- this map can be given to the liveness code so that it only operates over variables with regions in their types, instead of all variables.

region_infer [
Experimental
]
renumber [
Experimental
]
type_check [
Experimental
]

This pass type-checks the MIR to ensure it is not broken.

universal_regions [
Experimental
]

Code to extract the universally quantified regions declared on a function and the relationships between them. For example:

Traits

ToRegionVid [
Experimental
]

Right now, we piggy back on the ReVar to store our NLL inference regions. These are indexed with RegionVid. This method will assert that the region is a ReVar and extract its internal index. This is reasonable because in our MIR we replace all universal regions with inference variables.

Functions

compute_regions [
Experimental
]

Computes the (non-lexical) regions from the input MIR.

dump_annotation [
Experimental
]
dump_mir_results [
Experimental
]
for_each_region_constraint [
Experimental
]
live_variable_set [
Experimental
]
replace_regions_in_mir [
Experimental
]

Rewrites the regions in the MIR to use NLL variables, also scraping out the set of universal regions (e.g., region parameters) declared on the function. That set will need to be given to compute_regions.