2 ms·
Non-lexical lifetimes don't depend on reducibility. The RFC I wrote works fine for irreducible CFGs: https://github.com/rust-lang/rfcs/pull/396 https://github.
by cwzwarich 11y ago
Non-lexical lifetimes don't depend on reducibility. The RFC I wrote works fine for irreducible CFGs:
https://github.com/rust-lang/rfcs/pull/396 https://github.com/rust-lang/rfcs/pull/396
It does have the effect of picking a single dominating entry point for a loop with multiple entry points, but if you want a single-entry region that's necessarily true. Multiple-entry regions are probably possible, but they could be counterintuitive and produce even stranger error messages than the current region system.
The borrow checker is based on dataflow analyses that should work on arbitrary CFGs, assuming an appropriately generalized notion of region.