Skip to content

NLL: complete transition from migrate to full NLL #57895

Closed
@pnkfelix

Description

@pnkfelix
Member

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.

    • 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

Activity

added
A-NLLArea: Non-lexical lifetimes (NLL)
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
on Jan 25, 2019
pnkfelix

pnkfelix commented on Feb 27, 2019

@pnkfelix
MemberAuthor

triage: P-high. Assigning to self.

self-assigned this
on Feb 27, 2019
pnkfelix

pnkfelix commented on Mar 28, 2019

@pnkfelix
MemberAuthor

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

Centril commented on Mar 28, 2019

@Centril
Contributor

(updated ^ with links)

pnkfelix

pnkfelix commented on Jul 12, 2019

@pnkfelix
MemberAuthor

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

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-NLLArea: Non-lexical lifetimes (NLL)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCP-mediumMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @pnkfelix@crlf0710@Centril@jackh726

      Issue actions

        NLL: complete transition from migrate to full NLL · Issue #57895 · rust-lang/rust