This repository was archived by the owner on Jul 14, 2018. It is now read-only.
This repository was archived by the owner on Jul 14, 2018. It is now read-only.
Non-lexical lifetimes #16
Open
Description
Point of contact
Tracking issue: rust-lang/rust#43234
Overview
See @nikomatsakis's blog posts (intro, NLL via liveness, the outlives relation) for an overview.
We want the lifetimes implicitly attached to borrows &expr
to be refined, so that instead of being associated (sometimes loosely) with a lexical scope, each lifetime would now map to something else, (e.g. a set of points in the control-flow graph, though this alone is problematic unless it includes some context-sensitivity incorporating liveness)
A proposed design appears in a more recent blog series:
Status
(steps needed for NLL and their current status)
- Develop model for static semantics of non-lexical lifetimes. (E.g. what do lifetimes denote, how do following work: subtyping, region-inference, type- and borrow-checking.)
- Add NLL encoding of lexical lifetimes to MIR (
EndRegion
statements) MIR EndRegion Statements (was MIR dataflow for Borrows) rust#39409 - Port borrow-checker to MIR (in progress, current branch needs rebasing, fixing, factoring into smaller pieces for landing)
- Add NLL region inference, revising location of
EndRegion
statements and allow more (sound) code through.