summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/if_same_then_else.txt
blob: 75127016bb8c18d0e8992b000e7436725a8e1ffa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
### What it does
Checks for `if/else` with the same body as the *then* part
and the *else* part.

### Why is this bad?
This is probably a copy & paste error.

### Example
```
let foo = if … {
    42
} else {
    42
};
```