RS.CLIPPY.ERASING_OP

Using erasing operations, e.g., `x * 0` or `y & 0`

This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: erasing_op. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for erasing operations, e.g., x * 0.

Why is this bad?

The whole expression can be replaced by zero. This is most likely not the intended outcome and should probably be corrected

Example

let x = 1;
0 / x;
0 * x;
x & 0;