- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Given the following code: link
enum test {
    a == 1,
}
fn main() {
    let x == 2;
}The current output is:
   Compiling playground v0.0.1 (/playground)
error: expected one of `(`, `,`, `=`, `{`, or `}`, found `==`
 --> src/main.rs:2:7
  |
2 |     a == 1,
  |       ^^ expected one of `(`, `,`, `=`, `{`, or `}`
error: expected item, found `==`
 --> src/main.rs:2:7
  |
2 |     a == 1,
  |       ^^ expected item
error: could not compile `playground` due to 2 previous errors
Ideally the output should suggest replacing the == with = where appropriate as the suggestion for incorrect usage of = in place of == already exist.
steffahn
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.