Non-Lexical Lifetimes
Lead: pnkfelix
Chat: WG-compiler-nll
NLL RFC

Getting started

The best way to start is to read this document, then join the chat and say hello! We’ll help you from there.

Goals

By the end of the impl period, we should have:
  • MIR-borrowck: Working (though still opt-in) MIR-borrowck based on EndRegion’s inserted according to lexical scope rules
  1. the error messages are comparable to what AST-borrowck +produces (in terms of information content), and
  1. all discrepancies between MIR-borrowck and AST-borrowck are accounted for (with reasons other than “MIR-borrowck bug”)

  • NLL-modeling: Niko’s NLL prototype migrated to rust-lang-nursery, as a place to work out remaining questions in the NLL RFC and more generally serve as a staging ground for future borrowck changes.

  • Follow-on goal: hook NLL-inference output up to MIR-borrowck.

Who to talk to?

If you’ve got questions, please reach out! People who hack actively in this area include:
Gitter
IRC
@pnkfelix
pnkfelix
@nikomatsakis
nmatsakis
(Note: these people are spread across various time zones. If you ping them, they will respond when they can, but it may not be immediate.)

Alumni
We just want to give credit where credit is due: ariel no longer has time to volunteer as proactively as he once did, but his leadership and raw hacking power is undisputed.
Gitter
IRC
@arielb1
arielby

Open work items

  • This can be a link to a github search (e.g. “impl period milestone + E-mentored”)
  • It can also include manually-curated items
  • (pnkfelix expects new work items to be added, especially as part of the Categorize discrepancies between MIR-borrowck and AST-borrowck” task)
  • Have some way for tracking the state of borrowck errors at each commit. Maybe a git repository with a script? Maybe a spreadsheet with a script?

Mentoring instructions needed:

PNKFELIX - how did you check for discrepancies?
  • by hand
I suppose I can do that
MIR-borrowck
  • MIR-borrowck: We should also make sure that borrows don't "escape" in panic paths, so I'll probably have to create storagedead there and remove them after borrowck (arielb1, needs an issue)
  • MIR-borrowck: we want some automated way of tracking the status of borrowck errors. I’m thinking of some online database (dropbox paper, github, a google doc?) of borrowck output on each test, and some way for humans to bless specific outputs. Need some “app dev” skillz.
  • MIR-borrowck: Add false “unwind” edges to MIR to break infinite loops, (RFC)
  • Maybe related: Add “phantom edges” so that borrowck thinks all arms of a match are reachable and report errors for all of them (rust#45043). Fixed by PR rust#45200, should be reworked as part of rust#45184
  • see also rust#45184 MIR: permit "false edges", that are only used in the analysis