- Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
Description
In my project I have a bunch of code like this:
use static_assertions as sa; const MY_FLAG: u32 = const { // const computation }; // Enforce that the flag mask contains only one bit sa::const_assert_eq!(MY_FLAG.count_ones(), 1);
The new manual_is_power_of_two
lint gets triggered by the assert. Changing it to is_power_of_two()
as suggested by the lint would make the intent less clear.
Version
rustc 1.84.0-nightly (27861c4 2024-10-13)
binary: rustc
commit-hash: 27861c4
commit-date: 2024-10-13
host: x86_64-unknown-linux-gnu
release: 1.84.0-nightly
LLVM version: 19.1.1
Additional Labels
No response
clarfonthey
Metadata
Metadata
Assignees
Labels
No labels