RS.CLIPPY.LET_UNDERSCORE_MUST_USE

Non-binding `let` on a `#[must_use]` expression

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

What it does

Checks for let _ = <expr> where expr is #[must_use]

Why restrict this?

To ensure that all #[must_use] types are used rather than ignored.

Example

fn f() -> Result<u32, u32> {
    Ok(0)
}

let _ = f();
// is_ok() is marked #[must_use]
let _ = f().is_ok();