Skip to content
New issue

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

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

Already on GitHub? # to your account

NLL: turn on borrowck=migrate by default on 2015 edition #57804

Closed
pnkfelix opened this issue Jan 21, 2019 · 3 comments · Fixed by #59114
Closed

NLL: turn on borrowck=migrate by default on 2015 edition #57804

pnkfelix opened this issue Jan 21, 2019 · 3 comments · Fixed by #59114
Assignees
Labels
A-NLL Area: Non-lexical lifetimes (NLL) C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC P-high High priority

Comments

@pnkfelix
Copy link
Member

pnkfelix commented Jan 21, 2019

As a sub-step towards having NLL produce hard errors (rather than downgrading its errors to warnings) and removing the AST-borrowck code, we want to turn on the NLL migration mode (introduced with the 2018 edition) so that it operates in all editions. Namely, we want to introduce the -Z borrowck=migrate (and associated -Z two-phase-borrows) on the 2015 edition.

This is a subtask of #43234


On Zulip, @matthewjasper composed the following interesting table summarizing the open issues related to this, which I am transcribing here (with some light editing to replace pronouns with names).

all blocking issues are marked either P-High or NLL-Sound of those issues the current state is:

Issue number Blocks migrate Assigned To Notes
#46702 Yes @matthewjasper / @nikomatsakis Fixed by #57714
#56254 Yes @matthewjasper #58739
#57170 Yes @matthewjasper Fixed by #57202
#57731 Yes @matthewjasper Fixed by #57714
#58127 Yes @matthewjasper Fixed by #58347
#58178 Yes No @matthewjasper Good enough after #58347
#54105 No @nikomatsakis Needs to be fixed, but not clear what, if any, code this affects
#54940 No @nikomatsakis Obscure, no easy fix
#46901 No @pnkfelix need some idea what we're allowing for 2 phase borrows; (note #56254 above)
#54943 No @matthewjasper Fixed as part of #57714
#56993 No @nikomatsakis Just a test issue now
#57374 No @lqd / @nikomatsakis Not an issue in migrate mode
@pnkfelix pnkfelix added the A-NLL Area: Non-lexical lifetimes (NLL) label Jan 21, 2019
@pnkfelix
Copy link
Member Author

(Also on Zulip, @matthewjasper stated that they think this should be possible to do for the 1.34 release (beta cut on 2019-02-28, release on 2019-04-11).)

@matthewjasper
Copy link
Contributor

I've updated the table to the current state.

@Centril Centril added the C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC label Jan 22, 2019
@pnkfelix pnkfelix self-assigned this Feb 13, 2019
@pnkfelix
Copy link
Member Author

triage: P-high

@pnkfelix pnkfelix added the P-high High priority label Feb 27, 2019
bors added a commit that referenced this issue Mar 11, 2019
Enable NLL migrate mode on the 2015 edition

Blocked on #58739

## What is in this PR?

* Remove the `-Zborrowck=ast` flag option from rustc.
* The default in the 2015 edition is now `-Zborrowck=migrate`.
* The 2018 edition default is unchanged: it's still `-Zborrowck=migrate`.
* Enable the `-Ztwo-phase-borrows` flag on all editions.
* Remove most dead code that handled these options.
* Update tests for the above changes.

## What is *not* in this PR?

These are left for future PRs

* Use `-Zborrowck=mir` in NLL compare mode tests
* Remove the `-Zborrowck=compare` option
* Remove the `-Ztwo-phase-borrows` flag. It's kept so that perf.rlo has time to stop using it (cc @Mark-Simulacrum)
* Remove MIR typeck as its own MIR pass - it's now run by NLL.
* Enabling `-Zborrowck=mir` by default

Soundness issues that are fixed by NLL will stay open until full NLL is emitting hard errors. However, these diagnostics and completeness issues can now be closed:

Closes #18330
Closes #22323
Closes #23591
Closes #26736
Closes #27487
Closes #28092
Closes #28970
Closes #29733
Closes #30104
Closes #38915
Closes #39908
Closes #43407
Closes #47524
Closes #48540
Closes #49073
Closes #52614
Closes #55085
Closes #56093
Closes #56496
Closes #57804

cc #43234

r? @pnkfelix
cc @rust-lang/lang
cc @rust-lang/wg-compiler-nll
bors added a commit that referenced this issue Apr 22, 2019
Enable NLL migrate mode on the 2015 edition

## What is in this PR?

* Remove the `-Zborrowck=ast` flag option from rustc.
* The default in the 2015 edition is now `-Zborrowck=migrate`.
* The 2018 edition default is unchanged: it's still `-Zborrowck=migrate`.
* Enable two-phase borrows (currently toggled via the `-Ztwo-phase-borrows` flag) on all editions.
* Remove most dead code that handled these options.
* Update tests for the above changes.

## What is *not* in this PR?

These are left for future PRs

* Use `-Zborrowck=mir` in NLL compare mode tests (#56993)
* Remove the `-Zborrowck=compare` option (#59193)
* Remove the `-Ztwo-phase-borrows` flag. It's kept, as a flag that does nothing so that perf.rlo has time to stop using it (cc @Mark-Simulacrum)
* Remove MIR typeck as its own MIR pass - it's now run by NLL.
* Enabling `-Zborrowck=mir` by default (#58781)
* Replace `allow_bind_by_move_patterns_with_guards` and `check_for_mutation_in_guard_via_ast_walk` with just using the feature gate. (#59192)

Soundness issues that are fixed by NLL will stay open until full NLL is emitting hard errors. However, these diagnostics and completeness issues can now be closed:

Closes #18330
Closes #22323
Closes #23591
Closes #26736
Closes #27487
Closes #28092
Closes #28970
Closes #29733
Closes #30104
Closes #38915
Closes #39908
Closes #43407
Closes #47524
Closes #48540
Closes #49073
Closes #52614
Closes #55085
Closes #56093
Closes #56496
Closes #57804

cc #43234

r? @pnkfelix
cc @rust-lang/lang
cc @rust-lang/wg-compiler-nll
bors added a commit that referenced this issue Apr 22, 2019
Enable NLL migrate mode on the 2015 edition

## What is in this PR?

* Remove the `-Zborrowck=ast` flag option from rustc.
* The default in the 2015 edition is now `-Zborrowck=migrate`.
* The 2018 edition default is unchanged: it's still `-Zborrowck=migrate`.
* Enable two-phase borrows (currently toggled via the `-Ztwo-phase-borrows` flag) on all editions.
* Remove most dead code that handled these options.
* Update tests for the above changes.

## What is *not* in this PR?

These are left for future PRs

* Use `-Zborrowck=mir` in NLL compare mode tests (#56993)
* Remove the `-Zborrowck=compare` option (#59193)
* Remove the `-Ztwo-phase-borrows` flag. It's kept, as a flag that does nothing so that perf.rlo has time to stop using it (cc @Mark-Simulacrum)
* Remove MIR typeck as its own MIR pass - it's now run by NLL.
* Enabling `-Zborrowck=mir` by default (#58781)
* Replace `allow_bind_by_move_patterns_with_guards` and `check_for_mutation_in_guard_via_ast_walk` with just using the feature gate. (#59192)

Soundness issues that are fixed by NLL will stay open until full NLL is emitting hard errors. However, these diagnostics and completeness issues can now be closed:

Closes #18330
Closes #22323
Closes #23591
Closes #26736
Closes #27487
Closes #28092
Closes #28970
Closes #29733
Closes #30104
Closes #38915
Closes #39908
Closes #43407
Closes #47524
Closes #48540
Closes #49073
Closes #52614
Closes #55085
Closes #56093
Closes #56496
Closes #57804

cc #43234

r? @pnkfelix
cc @rust-lang/lang
cc @rust-lang/wg-compiler-nll
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-NLL Area: Non-lexical lifetimes (NLL) C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC P-high High priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants