clippy::manual_bits should not be detected in macros #13563
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
Using
size_of::<$T>() * 8
is a fully generic way in macros to get the size of some type$T
in bits. This allows the macro to be used for any kind of type. If this macro is then used on a numeric type clippy should not tell you to useBITS
because it's possible, perhaps even likely, that the macro is also used for non-numeric types.Lint Name
clippy::manual_bits
Reproducer
Version
rustc 1.80.1 (3f5fd8dd4 2024-08-06)
binary: rustc
commit-hash: 3f5fd8dd41153bc5fdca9427e9e05be2c767ba23
commit-date: 2024-08-06
host: aarch64-apple-darwin
release: 1.80.1
LLVM version: 18.1.7
Additional Labels
No response
The text was updated successfully, but these errors were encountered: