summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/redundant_pattern.txt
blob: 45f6cfc86702c08afa235c8771990bd63d5727ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
### What it does
Checks for patterns in the form `name @ _`.

### Why is this bad?
It's almost always more readable to just use direct
bindings.

### Example
```
match v {
    Some(x) => (),
    y @ _ => (),
}
```

Use instead:
```
match v {
    Some(x) => (),
    y => (),
}
```