-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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: change compare-mode=nll to use borrowck=migrate #55134
Conversation
When lints are emitted from the AST borrow checker, they do not signal an error as it is not known at that time whether, due to attributes, that lint will error or warn. This means that when lints are buffered in the MIR they will always be downgraded, as the AST borrowck will not have been marked as having errored, even if a lint was upgraded to an error after being emitted from the AST borrowck. The simple solution to this is to not buffer any lints from the MIR borrowck.
This commit changes the NLL compare mode to pass `-Z borrowck=migrate` rather than `-Z borrowck=nll` to better test what will be deployed. It does not include the test output updates, as separation of these commits makes reviewing simpler.
This commit updates the test output for the updated NLL compare mode that uses `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The previous commit changes `compiletest` and this commit only updates `.nll.stderr` files.
This PR looks fine as it stands. I didn't read over everything in commit 539404b, but I did some spot checking of the changes in output. However, there is some debate about whether this PR should land before or after we do the third and final round of .stderr review (issue #54528) ... so I'm delaying slightly on r+'ing this until after we've resolved that Question. |
From @nikomatsakis:
That makes sense to me. So I say, we land this now. And we can figure out what to do for #54528 after it lands. |
@bors r+ p=1 |
📌 Commit 539404b has been approved by |
(i gave this priority=1 because I'm concerned about the .stderr files going stale quickly.) |
⌛ Testing commit 539404b with merge 4e9f799bfd25b1c80cb5c0db608056eb0425f7e9... |
💔 Test failed - status-travis |
@bors retry |
NLL: change compare-mode=nll to use borrowck=migrate Fixes #55118. This PR is split into two parts: The first commit is a minor change that fixes a flaw in the existing `borrowck=migrate` implementation whereby a lint that was promoted to an error in the AST borrow checker would result in the same lint from the NLL borrow checker being downgraded to a warning in migrate mode. This PR fixes this by ensuring lints are exempt from buffering in the NLL borrow checker. The second commit updates `compiletest` to make the NLL compare mode use `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The third commit shows all the test output changes that result from this. r? @pnkfelix
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors retry Should definitely not be related to this... |
NLL: change compare-mode=nll to use borrowck=migrate Fixes #55118. This PR is split into two parts: The first commit is a minor change that fixes a flaw in the existing `borrowck=migrate` implementation whereby a lint that was promoted to an error in the AST borrow checker would result in the same lint from the NLL borrow checker being downgraded to a warning in migrate mode. This PR fixes this by ensuring lints are exempt from buffering in the NLL borrow checker. The second commit updates `compiletest` to make the NLL compare mode use `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The third commit shows all the test output changes that result from this. r? @pnkfelix
☀️ Test successful - status-appveyor, status-travis |
Fixes #55118.
This PR is split into two parts:
The first commit is a minor change that fixes a flaw in the existing
borrowck=migrate
implementation whereby a lint that was promoted to an error in the AST borrow checker would result in the same lint from the NLL borrow checker being downgraded to a warning in migrate mode. This PR fixes this by ensuring lints are exempt from buffering in the NLL borrow checker.The second commit updates
compiletest
to make the NLL compare mode use-Z borrowck=migrate
rather than-Z borrowck=mir
. The third commit shows all the test output changes that result from this.r? @pnkfelix