-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
>= typo gives unclear error message #98128
Copy link
Copy link
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.
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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Given the following code:
The current output is:
playground
This had me very confused for a surprising amount of time. It would be nice if the compiler would give a suggestion to replace
=>with>=. In my opinion, this would help a lot for someone typing quickly, and would make it clear that the symbols were in reverse. It might also lead to some false positives, but I think it would still be nice to have.The error is actually worse for macros:
The current output for this macro is:
My suggestion it to simply add a
helpsection to both of the above errors, which would suggest replacing the=>token with>=.