unused_parens
reported on complex enum struct-variant literal in match scrutinee expression is actually necessary
#113459
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
No `unused_parens` warning.
Rationale and extra context
The
unused_parens
lint should not fire in this case because the parentheses are actually necessary. Otherwise, following the help to "remove these parentheses" will cause a compilation error.Although, following help from the error after applying the suggestion from the
unused_parens
lint does lead to valid code.Other cases
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: