summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/zero_divided_by_zero.txt
blob: 394de20c0c0c68e59fee4aa54c1ad1393790780b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
### What it does
Checks for `0.0 / 0.0`.

### Why is this bad?
It's less readable than `f32::NAN` or `f64::NAN`.

### Example
```
let nan = 0.0f32 / 0.0;
```

Use instead:
```
let nan = f32::NAN;
```