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

🔬 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?

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.

Structs

LiveVar [
Experimental
]
NllLivenessMap [
Experimental
]

Map between Local and LiveVar indices: the purpose of this map is to define the subset of local variables for which we need to do a liveness computation. We only need to compute whether a variable X is live if that variable contains some region R in its type where R is not known to outlive a free region (i.e., where R may be valid for just a subset of the fn body).