no-erasing-operation Disallow operations that erase their operand into a constant An integral operation with an erasing operand produces a constant whenever the operation completes. Instead, you SHOULD correct the operator or constant operand that caused the value to be discarded. - Category: suspicious - Level: warning - Fix: none - Scope: module Reported function erase(value: int32): int32 { return value * 0; } Accepted function retain(value: int32): int32 { return value; } Prior art - Clippy ยท erasingop language/linter/src/rules/suspicious/noerasingoperation.rs:6