]>
Commit | Line | Data |
---|---|---|
f2b60f7d FG |
1 | ### What it does |
2 | Checks for a `#[must_use]` attribute without | |
3 | further information on functions and methods that return a type already | |
4 | marked as `#[must_use]`. | |
5 | ||
6 | ### Why is this bad? | |
7 | The attribute isn't needed. Not using the result | |
8 | will already be reported. Alternatively, one can add some text to the | |
9 | attribute to improve the lint message. | |
10 | ||
11 | ### Examples | |
12 | ``` | |
13 | #[must_use] | |
14 | fn double_must_use() -> Result<(), ()> { | |
15 | unimplemented!(); | |
16 | } | |
17 | ``` |