]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/let_underscore_must_use.txt
:arrow_up: rust-analyzer
[rust.git] / src / tools / clippy / src / docs / let_underscore_must_use.txt
1 ### What it does
2 Checks for `let _ = <expr>` where expr is `#[must_use]`
3
4 ### Why is this bad?
5 It's better to explicitly handle the value of a `#[must_use]`
6 expr
7
8 ### Example
9 ```
10 fn f() -> Result<u32, u32> {
11     Ok(0)
12 }
13
14 let _ = f();
15 // is_ok() is marked #[must_use]
16 let _ = f().is_ok();
17 ```