RS.CLIPPY.LET_UNDERSCORE_FUTURE

Non-binding `let` on a future

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_future. Copyright ©2025 The Rust Team. All rights reserved.

What it does

Checks for let _ = <expr> where the resulting type of expr implements Future

Why is this bad?

Futures must be polled for work to be done. The original intention was most likely to await the future and ignore the resulting value.

Example

async fn foo() -> Result<(), ()> {
    Ok(())
}
let _ = foo();

Use instead:

async fn foo() -> Result<(), ()> {
    Ok(())
}
let _ = foo().await;