-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 migration mode sometimes prints more diagnostics than either AST-borrowck or NLL #53004
Comments
Actually my hypothesis that this is the sum of the two sets of errors is clearly false given even just the simple example above. Where does
when that particular level of detail is not included in either of the other diagnostics presented in the other two files...? |
Ah wait, this was actually an expected side-effect of migrate mode, due to this part of #52681 rust/src/librustc_mir/borrow_check/mod.rs Lines 1920 to 1958 in 4dae470
|
So there a some follow up questions I now have:
|
Having said that, neither of these follow up questions is sufficiently high priority for me to spend more time on them today. I'm going to unassign myself from this issue, but leave it open so that people can find it if they similarly encounter this arguably bizarre behavior from migration mode (which is turned on in |
although now that I think about it more ... I'm certain that in my original justification for the newly generated diagnostics from cases like but clearly this is a case where AST-borrowck did error, or at least something in that pipeline errored. So something is still funky here. |
@pnkfelix I am doing a triage sweep and am not sure where to put this -- going to put in Edition Release for now I guess. |
(I think I'm going to turn this into a metabug and will file individual issues when I encounter specific cases, like #55309) |
…te-messages, r=pnkfelix Don't emit cannot move errors twice in migrate mode Closes rust-lang#55154 cc rust-lang#53004 r? @pnkfelix
A lot of the cases here have been addressed, especially by PR #55221. The 3rd NLL diagnostic review (#54528) contains an updated list of all the diagnostic deviations. I suspect at this point that (and/or the associated project) should be the canonical database for listing deviations like the ones listed here. So, I'm closing this issue. |
While investigating #52979, I noticed some of the diagnostics from
--edition 2018
are different than what either of thetest.stderr
andtest.nll.stderr
would lead one to expect to see.This appears to arise from the implementation of
-Z borrowck=migrate
, from what I can tell.For example, on ui/borrowck/borrowck-in-static.rs, we have from AST-borrowck:
rust/src/test/ui/borrowck/borrowck-in-static.stderr
Lines 1 to 9 in 40cb447
and from NLL we have:
rust/src/test/ui/borrowck/borrowck-in-static.nll.stderr
Lines 1 to 7 in 40cb447
but I am seeing this from
-Z borrowck=migrate
:My guess that this is arising because I must have missed at least one case where AST-borrowck signals an error. Thus, when the
-Z borrowck=migrate
runs the AST-borrowck as a fallback in response to an error encounters during the MIR-borrowck, the user can sometimes see the both sets the errors from both NLL and AST-borrowck.The text was updated successfully, but these errors were encountered: