cast-related lint should warn internal macros #11738
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
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Summary
It would be reasonable not to warn about code generated by external macros (macros defined in dependencies or standard libraries), since there is no way for the user to fix it. However, it would make sense to warn about code generated by internal macros (macros defined in the current crate).
I have confirmed that at least the following lints have this false negative (playground):
And I have confirmed that at least the following lint does NOT have this false negative (playground):
Lint Name
cast_lossless,cast_possible_truncation,cast_precision_loss,cast_sign_loss
Reproducer
I tried this code:
I expected to see this happen: clippy warns 4 casts inside macros
Instead, this happened: no warnings
playground
Version
The text was updated successfully, but these errors were encountered: