Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NLL: complete transition from migrate to full NLL #57895

Closed
4 of 6 tasks
pnkfelix opened this issue Jan 25, 2019 · 7 comments
Closed
4 of 6 tasks

NLL: complete transition from migrate to full NLL #57895

pnkfelix opened this issue Jan 25, 2019 · 7 comments
Assignees
Labels
A-NLL Area: Non-lexical lifetimes (NLL) C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@pnkfelix
Copy link
Member

pnkfelix commented Jan 25, 2019

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

@pnkfelix pnkfelix added A-NLL Area: Non-lexical lifetimes (NLL) C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Jan 25, 2019
@pnkfelix
Copy link
Member Author

triage: P-high. Assigning to self.

@pnkfelix
Copy link
Member Author

pnkfelix commented 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:

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.

  • (Of course, if the aforementioned language features are intended to be deployed for both the 2015 and 2018 editions, then the supposed support collapses.)

@Centril
Copy link
Contributor

Centril commented Mar 28, 2019

(updated ^ with links)

@pnkfelix
Copy link
Member Author

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.

@pnkfelix pnkfelix added P-medium Medium priority and removed P-high High priority labels Jul 12, 2019
@Centril
Copy link
Contributor

Centril commented Sep 25, 2019

@Centril
Copy link
Contributor

Centril commented Sep 26, 2019

I believe the only things that remain now are dealing with #57642 and #59159 and then we can remove migrate mode. Also, it's worth looking at https://github.com/rust-lang/rust/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3ANLL-sound+.

@jackh726
Copy link
Member

Closing in favor of #58781 and #43234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-NLL Area: Non-lexical lifetimes (NLL) C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. P-medium Medium priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants