summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/double_must_use.txt
blob: 0017d10d40d339344e8c1f4a7aec32fa2227a818 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
### What it does
Checks for a `#[must_use]` attribute without
further information on functions and methods that return a type already
marked as `#[must_use]`.

### Why is this bad?
The attribute isn't needed. Not using the result
will already be reported. Alternatively, one can add some text to the
attribute to improve the lint message.

### Examples
```
#[must_use]
fn double_must_use() -> Result<(), ()> {
    unimplemented!();
}
```