bad_bit_mask
is misguided and the documentation is misleading & unnecessarily combative
#14167
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
The documentation says "So the code is actively misleading, and the only reason someone would write this intentionally is to win an underhanded Rust contest or create a test-case for this lint."
There are probably a lot of reasons why one would use such a bit mask. In my case, I have:
When compiling for some platforms,
FORCE_DYNAMIC_DETECTION
is non-zero, and on other platforms it is zero. In no case (AFAIK) is it wrong. And definitely the code isn't trying to be misleading.Lint Name
bad_bit_mask
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
No lint.
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: