summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/decimal_literal_representation.txt
blob: daca9bbb3a848c7dd2b9314b952ee68760230ae5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
### What it does
Warns if there is a better representation for a numeric literal.

### Why is this bad?
Especially for big powers of 2 a hexadecimal representation is more
readable than a decimal representation.

### Example
```
`255` => `0xFF`
`65_535` => `0xFFFF`
`4_042_322_160` => `0xF0F0_F0F0`
```