False positive for unused_parens
in x as (T) < y
#106413
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-suggestion-diagnostics
Area: Suggestions generated by the compiler applied by `cargo fix`
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: Playground
The current output is:
But with the suggestion applied the compiler displays an error with a different suggestion:
Ideally the compiler should not output a warning and treat
x as (T) < y
and(x as T) < y
as identical.@rustbot label D-incorrect A-suggestion-diagnostics
The text was updated successfully, but these errors were encountered: