Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upnon-lexical lifetimes (NLL) tracking issue #43234
Comments
nikomatsakis
added
the
T-compiler
label
Jul 14, 2017
This comment has been minimized.
This comment has been minimized.
|
I've written up a gist with the initial draft of a plan. It lays out the first few steps anyway and some of the initial vision. I'll just copy-and-paste the end here, which lays out some of the PRs I think would make sense: (list moved to header) |
This comment has been minimized.
This comment has been minimized.
|
@Nashenas88 has expressed some interest in doing this! It occurs to me that this project may be big enough for multiple people, too. |
Nashenas88
referenced this issue
Jul 16, 2017
Merged
Add empty MIR pass for non-lexical lifetimes #43271
bors
added a commit
that referenced
this issue
Jul 17, 2017
bors
added a commit
that referenced
this issue
Jul 18, 2017
Nashenas88
referenced this issue
Jul 19, 2017
Merged
Provide positional information when visiting ty, substs and closure_substs in MIR #43324
bors
added a commit
that referenced
this issue
Jul 20, 2017
Mark-Simulacrum
added
the
C-tracking-issue
label
Jul 28, 2017
bors
added a commit
that referenced
this issue
Jul 28, 2017
bors
added a commit
that referenced
this issue
Aug 10, 2017
pnkfelix
added
the
A-lifetimes
label
Sep 15, 2017
pnkfelix
added this to the
impl period milestone
Sep 15, 2017
pnkfelix
added
the
E-mentor
label
Sep 15, 2017
nikomatsakis
added
the
WG-compiler-nll
label
Sep 15, 2017
aturon
removed this from the
impl period milestone
Sep 15, 2017
This comment has been minimized.
This comment has been minimized.
|
have talked with @nikomatsakis and I'm joining this group |
SimonSapin
referenced this issue
Sep 25, 2017
Closed
Move src/librustc_mir/transform/nll.rs to a subdirectory #44845
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
Sep 29, 2017
This comment has been minimized.
This comment has been minimized.
|
With #45013 pretty much set. I'm willing to work on testing infrastructure. I just need to know what we want and what parts of the code I need to look at. |
nikomatsakis
referenced this issue
Nov 7, 2017
Closed
NLL: handle outlives relations, process region obligations in the MIR type checker #45826
This comment has been minimized.
This comment has been minimized.
|
EDIT: This is no longer true. |
This was referenced Nov 10, 2017
mark-i-m
referenced this issue
Nov 13, 2017
Closed
Tracking issue for RFC #2094: non-lexical lifetimes #44928
nikomatsakis
changed the title
prototype non-lexical lifetimes
non-lexical lifetimes tracking issue
Nov 16, 2017
nikomatsakis
referenced this issue
Dec 8, 2017
Merged
propagate `region_bound_pairs` into MIR type-check #25
rfcbot
added
proposed-final-comment-period
disposition-merge
labels
Sep 6, 2018
This comment has been minimized.
This comment has been minimized.
|
For the performance comparison to incremental uses cases @michaelwoerister mentioned, here's a test perf run with the NLL migrate mode enabled by default (that is, simulating opt-in to the 2018 edition in the coming Edition RC): comparison on perf.rlo. As Niko mentioned earlier, the The "baseline incremental-check" cases have lower overhead than the non-incremental "nll-check" cases (which are the worst-case benchmarks, tracked on the NLL dashboard) and the borrowck overhead is lower whenever codegen and LLVM are involved. |
This comment has been minimized.
This comment has been minimized.
Great, thanks for doing that! |
This comment has been minimized.
This comment has been minimized.
|
Is there an expectation that the overhead will disappear entirely over time, or do we have to try to squeeze the time out elsewhere? |
This comment has been minimized.
This comment has been minimized.
|
First, currently we are doing NLL borrow-checking and AST region inference, we would expect things to get faster when AST region inference is done. Second, there are probably some performance optimizations to be done, but I think that NLL is just doing more things than AST, and so will be slower for any given amount of optimization effort. |
rfcbot
added
final-comment-period
and removed
proposed-final-comment-period
labels
Sep 7, 2018
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Sep 7, 2018
|
|
rfcbot
added
the
finished-final-comment-period
label
Sep 17, 2018
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Sep 17, 2018
|
The final comment period, with a disposition to merge, as per the review above, is now complete. |
rfcbot
removed
the
final-comment-period
label
Sep 17, 2018
hannobraun
added a commit
to hannobraun/rust-dwm1001
that referenced
this issue
Sep 27, 2018
pnkfelix
added
metabug
and removed
A-metadata
labels
Oct 2, 2018
PaulCapron
referenced this issue
Oct 24, 2018
Merged
Remove some useless BufReader wrappers around stdin #1307
This was referenced Nov 6, 2018
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Nov 10, 2018
pietroalbini
added a commit
to pietroalbini/rust
that referenced
this issue
Nov 10, 2018
This comment has been minimized.
This comment has been minimized.
|
Anyone knows what are the conditions for removing the old AST-based borrow checker? I'm curious about the performance gain it will cause |
This comment has been minimized.
This comment has been minimized.
|
@orium Steps remaining, from what I remember/understand
(Issue #58781 captures both points 2 and 3 above.) Once we do those things, then I think we'll be in a good position to actually remove the AST-borrowck code. However: I do not expect this shift to yield a serious performance improvement. Or at least, not the one you might be expecting, based on how I interpret your comment. Removing the AST-borrowck code will only improve performance for code that is being rejected by the NLL checker (and thus falling back on running the AST-borrowck for determining if the NLL errors should be downgraded to warnings). We do not run the AST-borrowck code (or at least not the bulk of it) when your code is successfully passing the NLL borrow checker. Thus, if you do not see any warnings or errors from your code, then you probably won't see a performance improvement from the eventual removal of the AST-borrowck code. (The main exception I might imagine is whether there may be an impact from when we get rid of the AST-based region inference code and replace it with the NLL based one. But I don't know offhand if there is any serious performance impact associated with the AST-based region inference pass.) |
pnkfelix
referenced this issue
Jan 21, 2019
Open
NLL: turn on borrowck=migrate by default on 2015 edition #57804
This comment has been minimized.
This comment has been minimized.
|
Thanks for clarifying that @pnkfelix. I was under the impression the old borrow checker was somehow more involved. |
nikomatsakis commentedJul 14, 2017
•
edited by orium
This issue tracks the status of the transition to non-lexical lifetimes and a MIR-based borrow-checker. Both of these are jargon-y terms for compiler authors: the effect of these features on end-users is, simply put, that the compiler accepts a wider range of code with fewer bugs (and, hopefully, better error messages). We will refer to the combination of the above as NLL.
Key facts for getting involved
Implementation plan
#![feature(nll)]for experimentation.uitest suite. (Current plan forcompile-failsuite is to port majority of those tests toui)cargo checkwithout and with NLL turned on, so that we can see a summary of the current performance impact on the compiler's static analyses in isolation.Many of the work items for unchecked bullets above are gathered into one place on #57895
How to join the working group
If you'd like to help, please join the NLL working group -- just leave a comment below or ping @nikomatsakis on gitter and you will be added to the @rust-lang/wg-compiler-nll team. You will then get occasional pings (e.g., when new mentoring instructions are available or when looking for help), as well as being eligible to be assigned to issues and so forth. We discuss things on the WG-compiler-nll channel on Gitter.
How to find an issue to work on
To find important issues, use one of the following queries:
NLL-Complete, corresponding to code that should be accepted but isn't right now.NLL-sound, corresponding to code that should get errors, but isn't right now.NLL-diagnostics, corresponding to low quality error messages.NLL-performant, corresponding to cases where NLL analysis takes too long.You may also wish to look for E-mentor issues, which means that they have mentoring instructions. Also, if an issue is assigned, then someone is supposed to be working on it, but it's worth checking if they have made progress and pinging them -- people often get busy with other things.
Issues tagged with NLL-deferred are low priority right now, but if one strikes your fancy, feel free to tackle it!
How are issues are organized
All issues related to NLL are tagged with
WG-compiler-nll. They are further tagged with aNLL-foolabel to indicate a subcategory. Issues that have no NLL-label are considered "untriaged" and need to be sorted. Issues tagged with NLL-deferred are low priority right now.Finally, you can always take a look at the full list of NLL-related issues.
In particular, issues tagged with
E-mentorare those that contain mentoring instructions that can help you get started.Issues (and pull requests) tagged with
I-nominatedare meant to be reviewed by the WG-compiler-nll at each weekly meeting. Here's the current nominated list.If you can't find anything, reach out to @nikomatsakis on gitter.
Other issues
This section tracks related issues and notes.
Bugs in AST borrow check fixed in MIR borrowck
#47366 tracks known bugs from the AST borrow checker that were fixed in the MIR borrow checker. For each such bug, we have added a test to the repo with
#![feature(nll)]and then closed the relevant issue (obviously, though, the bug will still be reproducable until the MIR-based borrow checker is stabilized, presuming one uses the AST-based borrow checker). You can also search for things tagged with NLL-fixed-by-NLL.Questions to be resolved before stabilization
Possible extensions