Module rustc_mir::transform::clean_end_regions [] [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?

This module provides one pass, CleanEndRegions, that reduces the set of EndRegion statements in the MIR.

The "pass" is actually implemented as two traversals (aka visits) of the input MIR. The first traversal, GatherBorrowedRegions, finds all of the regions in the MIR that are involved in a borrow.

The second traversal, DeleteTrivialEndRegions, walks over the MIR and removes any EndRegion that is applied to a region that was not seen in the previous pass.

Structs

CleanEndRegions [
Experimental
]