Wrong suggestion with macro returning no expression #124585
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
Current output
Desired output
Rationale and extra context
The current suggestion adds a semicolon before the existing semicolon, which should at least be detected and, in that case, the current
help:
-line should be suppressed. One could add a specialized help-suggestion as in the desired output above, but that's not really that relevant. So:if there is a macro assigned to a
let
, I would alter the existing suggestion as mentioned above.Other cases
Suggestion if there is a missing semicolon
Interestingly, the suggestion is kind of correct, if the code is invalid (missing semicolon):But even then, the actual suggestion is not that helpful:
Rust Version
Anything else?
No response
The text was updated successfully, but these errors were encountered: