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

tracking issue for bugs fixed by the MIR borrow checker or NLL #47366

Closed
13 tasks done
nikomatsakis opened this issue Jan 11, 2018 · 8 comments · Fixed by #64221
Closed
13 tasks done

tracking issue for bugs fixed by the MIR borrow checker or NLL #47366

nikomatsakis opened this issue Jan 11, 2018 · 8 comments · Fixed by #64221
Labels
A-NLL Area: Non Lexical Lifetimes (NLL) C-bug Category: This is a bug. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. NLL-fixed-by-NLL Bugs fixed, but only when NLL is enabled. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nikomatsakis
Copy link
Contributor

nikomatsakis commented Jan 11, 2018

Part of: #43234

The MIR-based borrow checker used by NLL fixes a number of bugs in the existing AST-based borrow checker. Our plan for these bugs is to fix them by transitioning to the MIR-based borrow checker. In the meantime, we wish to add tests that show that the bugs are fixed with NLL, and then close the bugs (so they don't clutter up the issue tracker). This issue tracks the set of such bugs and gives instructions for how to proceed.

Bugs fixed by MIR

All these bugs are confirmed as fixed; the checkmark indicates that a PR with a test is enqueued or landed.

Procedure

  • First, if you wish, add yourself to the list of participants for the WG-compiler-nll working group.
    • This will help us to find people who might like to help later!
  • Create a regression test in src/test/ui/nll/
    • The name can be issue-XXX.rs, though giving a more descriptive name is also good
    • The file should include a comment saying // Regression test for #XXX however to ease searching later
  • This test should include the error from the bug along with the following header material:
    • Rust license
    • #![feature(nll)] at the top
    • comments like //~ ERROR for the errors, or whatever is needed for test harness to pass
  • Run ./x.py test --stage 1 src/test/ui --test-args nll, this will test all the nll tests (including yours)
  • Presuming that passes, open a PR! Otherwise, stop in at the WG-compiler-nll gitter channel
    • Put r? @nikomatsakis in the PR summary
@nikomatsakis nikomatsakis added E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-compiler-nll labels Jan 11, 2018
@nikomatsakis nikomatsakis added this to the NLL Future Compat Warnings milestone Jan 11, 2018
@chrisvittal
Copy link
Contributor

chrisvittal commented Jan 11, 2018

I'll take this. Looks straightforward.

@nikomatsakis
Copy link
Contributor Author

Added #45045 to the list.

@nikomatsakis
Copy link
Contributor Author

This isn't meant to be closed but rather kept open as a record of the issues involved. =)

@nikomatsakis
Copy link
Contributor Author

Added #46314 to the list

@nikomatsakis
Copy link
Contributor Author

Added #47053, though I think that it will be handled in #47425

@pnkfelix pnkfelix changed the title tracking issue for bugs fixed by the MIR borrow checker tracking issue for bugs fixed by the MIR borrow checker or NLL Jan 18, 2018
@nikomatsakis
Copy link
Contributor Author

Added #29723

@sapphire-arches
Copy link
Contributor

Added #16223

@nikomatsakis nikomatsakis added the NLL-fixed-by-NLL Bugs fixed, but only when NLL is enabled. label Mar 14, 2018
kennytm added a commit to kennytm/rust that referenced this issue Apr 4, 2018
…komatsakis

Regression test for rust-lang#46314

rust-lang#46314 is fixed by NLL. This PR adds a regression test for the bug. Intended for rust-lang#47366.
@jkordish jkordish added C-bug Category: This is a bug. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Apr 17, 2018
frewsxcv added a commit to frewsxcv/rust that referenced this issue Aug 17, 2018
…omatsakis

[nll] add regression test for issue rust-lang#27868

Adds a test for rust-lang#27868 ``Inconsistent evaluation order for assignment operations``

apart of rust-lang#47366 ``tracking issue for bugs fixed by the MIR borrow checker or NLL``

r? @nikomatsakis
@nikomatsakis nikomatsakis added A-NLL Area: Non Lexical Lifetimes (NLL) and removed WG-compiler-nll labels Aug 27, 2018
@acrrd
Copy link
Contributor

acrrd commented May 4, 2019

The test for #48238 has been added in #49295.
The test for #27868 has been added in #53326.
The test for #16223 (that appears two times in the list) has been added in #49781.

Centril added a commit to Centril/rust that referenced this issue Sep 26, 2019
…hewjasper

 Rust 2015: No longer downgrade NLL errors

As per decision on a language team meeting as described in rust-lang#63565 (comment), in Rust 2015, we refuse to downgrade NLL errors, that AST borrowck accepts, into warnings and keep them as hard errors.

The remaining work to throw out AST borrowck and adjust some tests still remains after this PR.

Fixes rust-lang#38899
Fixes rust-lang#53432
Fixes rust-lang#45157
Fixes rust-lang#31567
Fixes rust-lang#27868
Fixes rust-lang#47366

r? @matthewjasper
Centril added a commit to Centril/rust that referenced this issue Sep 26, 2019
…hewjasper

 Rust 2015: No longer downgrade NLL errors

As per decision on a language team meeting as described in rust-lang#63565 (comment), in Rust 2015, we refuse to downgrade NLL errors, that AST borrowck accepts, into warnings and keep them as hard errors.

The remaining work to throw out AST borrowck and adjust some tests still remains after this PR.

Fixes rust-lang#38899
Fixes rust-lang#53432
Fixes rust-lang#45157
Fixes rust-lang#31567
Fixes rust-lang#27868
Fixes rust-lang#47366

r? @matthewjasper
Centril added a commit to Centril/rust that referenced this issue Sep 26, 2019
…hewjasper

 Rust 2015: No longer downgrade NLL errors

As per decision on a language team meeting as described in rust-lang#63565 (comment), in Rust 2015, we refuse to downgrade NLL errors, that AST borrowck accepts, into warnings and keep them as hard errors.

The remaining work to throw out AST borrowck and adjust some tests still remains after this PR.

Fixes rust-lang#38899
Fixes rust-lang#53432
Fixes rust-lang#45157
Fixes rust-lang#31567
Fixes rust-lang#27868
Fixes rust-lang#47366

r? @matthewjasper
@bors bors closed this as completed in 3b5fbb6 Sep 27, 2019
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-bug Category: This is a bug. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. NLL-fixed-by-NLL Bugs fixed, but only when NLL is enabled. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants