Static rustc_lint::unused::UNUSED_MUST_USE

source ·
pub static UNUSED_MUST_USE: &Lint
Expand description

The unused_must_use lint detects unused result of a type flagged as #[must_use].

§Example

fn returns_result() -> Result<(), ()> {
    Ok(())
}

fn main() {
    returns_result();
}

{{produces}}

§Explanation

The #[must_use] attribute is an indicator that it is a mistake to ignore the value. See the reference for more details.