[][src]Module rustc_mir::borrow_check::nll::type_check::liveness

🔬 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

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 (LiveVar) that indexes into a list of "variables whose type contain regions". It also defines a map from Local to LiveVar 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.

local_use_map [
Experimental
]
trace [
Experimental
]

Functions

generate [
Experimental
]

Combines liveness analysis with initialization analysis to determine which variables are live at which points, both due to ordinary uses and drops. Returns a set of (ty, location) pairs that indicate which types must be live at which point in the CFG. This vector is consumed by constraint_generation.

regions_that_outlive_free_regions [
Experimental
]

Compute all regions that are (currently) known to outlive free regions. For these regions, we do not need to compute liveness, since the outlives constraints will ensure that they are live over the whole fn body anyhow.