Stronger macro check for identity-op and type-complexity #301
Labels
C-bug
Category: Clippy is not doing the correct thing
good-first-issue
These issues are a good way to get started with Clippy
S-needs-discussion
Status: Needs further discussion before merging or work can be started
T-middle
Type: Probably requires verifiying types
Macros are both used to make types easier to read and to create basic operations, sometimes relying on the compiler to remove identity operations so the macro is easier. Therefore I have written a new utility method
in_macro
that is more strict thanin_external_macro
, on the grounds that we want to rule out all macro expansion for some lints, e.g. the ones above (I'll make a PR shortly once my current rust build finishes).In the meantime I want to discuss which other lints should rule out not only internal but external macros? I share @Manishearth's uneasiness about false positives (not only) resulting from macro expansion, however, we should not throw out the baby with the bathwater.
The text was updated successfully, but these errors were encountered: