785643a5eb
extend NLL with preliminary support for free regions on functions This PR extends https://github.com/rust-lang/rust/pull/45538 with support for free regions. This is pretty preliminary and will no doubt want to change in various ways, particularly as we add support for closures, but it's enough to get the basic idea in place: - We now create specific regions to represent each named lifetime declared on the function. - Region values can contain references to these regions (represented for now as a `BTreeSet<RegionIndex>`). - If we wind up trying to infer that `'a: 'b` must hold, but no such relationship was declared, we report an error. It also does a number of drive-by refactorings. r? @arielb1 cc @spastorino |
||
---|---|---|
.. | ||
nll | ||
add_call_guards.rs | ||
add_validation.rs | ||
check_unsafety.rs | ||
clean_end_regions.rs | ||
copy_prop.rs | ||
deaggregator.rs | ||
dump_mir.rs | ||
elaborate_drops.rs | ||
erase_regions.rs | ||
generator.rs | ||
inline.rs | ||
instcombine.rs | ||
mod.rs | ||
no_landing_pads.rs | ||
promote_consts.rs | ||
qualify_consts.rs | ||
rustc_peek.rs | ||
simplify_branches.rs | ||
simplify.rs | ||
type_check.rs |