unused_parens lint should not complain about parens injected by macros #22451
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
The following code fails to compile:
The parentheses in the macro are, in general, not unnecessary (for the explanation of why they are necessary, see #22450).
In general, it is silly for lint to be trying to fix style errors of this sort within macros. The place for such stylistic judgement, IMO, is within the original source code, not within macros.
The text was updated successfully, but these errors were encountered: