diff options
Diffstat (limited to 'src/tools/clippy/src/docs/decimal_literal_representation.txt')
-rw-r--r-- | src/tools/clippy/src/docs/decimal_literal_representation.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/decimal_literal_representation.txt b/src/tools/clippy/src/docs/decimal_literal_representation.txt new file mode 100644 index 000000000..daca9bbb3 --- /dev/null +++ b/src/tools/clippy/src/docs/decimal_literal_representation.txt @@ -0,0 +1,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` +```
\ No newline at end of file |