]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/src/docs/decimal_literal_representation.txt
Merge commit 'b52fb5234cd7c11ecfae51897a6f7fa52e8777fc' into clippyup
[rust.git] / src / tools / clippy / src / docs / decimal_literal_representation.txt
1 ### What it does
2 Warns if there is a better representation for a numeric literal.
3
4 ### Why is this bad?
5 Especially for big powers of 2 a hexadecimal representation is more
6 readable than a decimal representation.
7
8 ### Example
9 ```
10 `255` => `0xFF`
11 `65_535` => `0xFFFF`
12 `4_042_322_160` => `0xF0F0_F0F0`
13 ```