manual-integer-log Prefer integerLog2 over equivalent base-two integer logarithms Subtracting the leading-zero count from an integer width manually computes its base-two logarithm. Instead, you SHOULD call integerLog2, which states the operation directly and preserves exact integer behavior. - Category: style - Level: warning - Fix: suggestion - Scope: module Reported function magnitude(value: uint32): uint32 { return 31 - value.countLeadingZeros(); } Accepted function magnitude(value: uint32): uint32 { return value.integerLog2(); } Prior art - Clippy ยท manualilog2 language/linter/src/rules/style/manualintegerlog.rs:8