Rellum Rellum

S0032: bitwise not requires Int

Generated from rellum-diagnostics/src/db.rs.

Explanation

The bitwise ~ operator flips bits in an integer value. It is not logical negation and is not defined for Float, Bool, Char, String, arrays, records, or enums.

Common causes

Canonical fixes

Before:

mask = ~flag

After:

mask = ~bits

Code example

mask = ~flag