-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingS-needs-discussionStatus: Needs further discussion before merging or work can be startedStatus: Needs further discussion before merging or work can be startedT-middleType: Probably requires verifiying typesType: Probably requires verifiying typesgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
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 than in_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.
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingS-needs-discussionStatus: Needs further discussion before merging or work can be startedStatus: Needs further discussion before merging or work can be startedT-middleType: Probably requires verifiying typesType: Probably requires verifiying typesgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy