-
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
Confusing suggestion when if is missing in else if #49361
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
The output in the current beta already points out at the place where the
|
estebank
added
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
A-diagnostics
Area: Messages for errors, warnings, and lints
labels
Mar 26, 2018
estebank
added
A-parser
Area: The parsing of Rust source code to an AST
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Oct 18, 2019
I still wish the parser to detect that the code immediately following
|
CC @compiler-errors, in case you might be interested in looking at the parser :) |
this seems like a neat fix, i'll take a stab at it |
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
May 24, 2022
…, r=davidtwco Parse expression after `else` as a condition if followed by `{` Fixes rust-lang#49361. Two things: 1. This wording needs help. I can never find a natural/intuitive phrasing when I write diagnostics 😅 2. Do we even want to show the "wrap in braces" case? I would assume most of the time the "add an `if`" case is the right one.
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
May 24, 2022
…, r=davidtwco Parse expression after `else` as a condition if followed by `{` Fixes rust-lang#49361. Two things: 1. This wording needs help. I can never find a natural/intuitive phrasing when I write diagnostics 😅 2. Do we even want to show the "wrap in braces" case? I would assume most of the time the "add an `if`" case is the right one.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-parser
Area: The parsing of Rust source code to an AST
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The error here is if is missing in else if
but compiler reports: error:
The text was updated successfully, but these errors were encountered: