If I were to come across such code I would immediately refactor that to literal bitmasks.
When one encounters something similar, and that is not
!0u (the obvious cases), the programmer reading the code has to spend some time at each bitmask to figure out what it is supposed to look like. Were such mask be used often across the codebase, some
consts.rs should then contain:
pub const DESCRIPTIVE_NAME: u32 = 0xFFFF_FFF6;
saving anybody from having to write whatever long incantation every time (s)he wants such a mask.
To me, it sounds like the removal of
-unsigned_int would overall benefit the bit-fiddling use case.