Mutare.Mutators.Bitwise (mutare v0.4.1)

Copy Markdown View Source

Mutates bitwise operators and their Bitwise function forms:

  • &&& ↔ ||| (band ↔ bor)
  • <<< ↔ >>> (bsl ↔ bsr)
  • ~~~x → x (bnot(x) → x)

Function calls may be direct, aliased, imported, or piped. Bitwise operations are guard-safe and are also mutated in guards.

A left/right shift by the literal value 0 is unchanged and is therefore omitted. AND/OR replacements and complement removal remain eligible.

bxor and ^^^ are not mutated because XOR has no complementary operator. The deprecated ~~~ form is supported. Imports introduced by use Bitwise are available only when that use can be expanded during resolution.

This family is enabled by default. Its ignore variants are &&&, |||, <<<, and >>>.