Closed
Description
This is a tracking issue for the work items remaining for the NLL team before we can consider NLL stabilized across all editions (see also #43234).
Here is an outline of the steps we have identified.
- Stage 1: Move all editions to NLL (NLL: turn on borrowck=migrate by default on 2015 edition #57804)
- Move Rust 2015 to borrowck=migrate
- Potential blockers:
- NLL-sound bugs that affect migration mode (vs ones that only arise with
#![feature(nll)]
today) - Major diagnostic regressions that affect migration mode
Stage 2: Transition fully to NLL (NLL: turn off migration mode #58781)- one currently opts into this via
#![feature(nll)]
or-Z borrowck=mir -Z two-phase-borrows
) - this causes NLL warnings (downgraded from errors) become errors again
- possible intermediate steps
- move to deny-by-default lints for the warnings
- move 2018 to hard error on its own, leaving 2015 with downgrade-to-warnings
- It also gets rid of AST-region inference, causing some code to be accepted that is rejected by migrate mode.
- Potential blockers:
- NLL-sound bugs that affect NLL mode without migration
- Major diagnostic regressions
- Two-phase borrows (2PB) question or other "unsettled questions" must have some conservative answer in place
- Crater run showing no major crates fail in practice
Stage 3: remove old AST-borrowck (done in Rest In Peace, AST borrowck (2012-2019) #64790)
Blocking issues
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
pnkfelix commentedon Feb 27, 2019
triage: P-high. Assigning to self.
pnkfelix commentedon Mar 28, 2019
While discussing #59114 at the T-lang design team meeting, one question that arose was whether we would move to hard error mode for both 2015 and 2018 at the same time, or if we would do it in a staged fashion (presumably on 2018 first and then following with 2015 sometime later).
Discussion of that pointed out the detail that there are some languge features that depend, in some fashion, on NLL.
An incomplete list follows:
bind_by_move_pattern_guards
, Tracking issue for Pattern Guards with Bind-By-Move #15287if let
match guards, Tracking issue for RFC 2294, "if let guard" #51114, propose if let guard rfcs#2294 (comment)The question then became whether those language feature depend solely on NLL migrate mode, or if they depend on NLL hard error mode. In particular, some features are deliberately choosing not to implement AST-borrowck support; in such cases, I can imagine an error under NLL migrate mode leading to an ICE (or worse, unsoundly accepting the code using a new feature with a mere warning) arising from migrate mode's attempt to run AST-borrowck when there was no support for that feature implemented in AST-borrowck.
This provides some support for the argument that we should move to full NLL mode in a staged fashion, doing only 2018 edition first (and the 2018 can add support for the aforementioned language features), and waiting to move to full NLL on the 2015 edition later.
Centril commentedon Mar 28, 2019
(updated ^ with links)
pnkfelix commentedon Jul 12, 2019
I no longer think this is a P-high issue. It is something we want to do, and something I plan to keep track of, but it is not something that warrants visiting every week at the compiler meeting.
triage: P-medium.
12 remaining items