rustc_lint::types

Static UNUSED_COMPARISONS

source
static UNUSED_COMPARISONS: &Lint
Expand description

The unused_comparisons lint detects comparisons made useless by limits of the types involved.

§Example

fn foo(x: u8) {
    x >= 0;
}

{{produces}}

§Explanation

A useless comparison may indicate a mistake, and should be fixed or removed.