summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/identity_op.txt
blob: a8e40bb43e9d51b2d528bde622560da8a60175c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
### What it does
Checks for identity operations, e.g., `x + 0`.

### Why is this bad?
This code can be removed without changing the
meaning. So it just obscures what's going on. Delete it mercilessly.

### Example
```
x / 1 + 0 * 1 - 0 | 0;
```