-
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
Parser incorrectly suggests adding semicolon after function in impl #87647
Comments
Assigning priority as discussed in the Zulip thread of the Prioritization Working Group. Bisection seems to confirm that #87436 may have a role here (specifically 8bebfe5), @ebobrow could perhaps have more info here? Thanks! @rustbot label -I-prioritize +P-medium |
Uh oh, sorry about this. I don't have any good ideas on how to fix it but I'll take a look. Alternatively, since none of the changes in #87436 are necessary, we could technically roll back the whole PR. It's definitely the cause of this issue. |
no worries @ebobrow and thanks for investigating |
If we can be sure that this is the only case where the semicolon check creates unwanted suggestions, we could make it optional, like with a helper function or an extra boolean parameter. That would prevent the ICE and give the expected error message, but I'm not sure how elegant it is. Thoughts? |
This is likely going to slip into the release, but it's just a diagnostics regression I think (the ICE fix landed), so seems OK. |
Yeah, this is the current playground output on beta 1.56.0:
|
…ected-semicolon, r=estebank Do not add `;` to expected tokens list when it's wrong There's a few spots where semicolons are checked for to do error recovery, and should not be suggested (or checked for other stuff). Fixes rust-lang#87647
…ected-semicolon, r=estebank Do not add `;` to expected tokens list when it's wrong There's a few spots where semicolons are checked for to do error recovery, and should not be suggested (or checked for other stuff). Fixes rust-lang#87647
…ected-semicolon, r=estebank Do not add `;` to expected tokens list when it's wrong There's a few spots where semicolons are checked for to do error recovery, and should not be suggested (or checked for other stuff). Fixes rust-lang#87647
This also ICEs, but that's a separate issue: #87635. The MCVE here is also from that issue.
I think this issue is also caused by #87436, based on looking at the changes in the test output from that PR. That PR seems to have changed the parser to emit an
expected `;`, found ...
error regardless of what token was actually expected.Code
Playground
Nightly error
Beta error
Meta
Regressed in nightly 1.56.0.
The text was updated successfully, but these errors were encountered: