Module clippy::bit_mask [] [src]

Structs

BitMask

Checks for incompatible bit masks in comparisons, e.g. x & 1 == 2. This cannot work because the bit that makes up the value two was zeroed out by the bit-and with 1. So the formula for detecting if an expression of the type _ <bit_op> m <cmp_op> c (where <bit_op> is one of {&, '|'} and <cmp_op> is one of {!=, >=, > , !=, >=, >}) can be determined from the following table:

Statics

BAD_BIT_MASK
INEFFECTIVE_BIT_MASK