Skip to content

NLL: complete transition from migrate to full NLL #57895

Closed
@pnkfelix

Description

@pnkfelix

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

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

Issue actions