2019-08-04 10:21:52 +02:00
|
|
|
// run-rustfix
|
|
|
|
|
2018-07-28 17:34:52 +02:00
|
|
|
#[warn(clippy::decimal_literal_representation)]
|
2018-01-16 14:01:07 +01:00
|
|
|
#[allow(unused_variables)]
|
2018-12-11 20:50:55 +01:00
|
|
|
#[rustfmt::skip]
|
2018-01-16 14:01:07 +01:00
|
|
|
fn main() {
|
2018-12-11 20:50:55 +01:00
|
|
|
let good = ( // Hex:
|
2018-12-09 23:26:16 +01:00
|
|
|
127, // 0x7F
|
|
|
|
256, // 0x100
|
|
|
|
511, // 0x1FF
|
|
|
|
2048, // 0x800
|
|
|
|
4090, // 0xFFA
|
|
|
|
16_371, // 0x3FF3
|
|
|
|
61_683, // 0xF0F3
|
|
|
|
2_131_750_925, // 0x7F0F_F00D
|
2018-02-06 13:05:20 +01:00
|
|
|
);
|
2018-12-11 20:50:55 +01:00
|
|
|
let bad = ( // Hex:
|
2018-01-16 14:01:07 +01:00
|
|
|
32_773, // 0x8005
|
|
|
|
65_280, // 0xFF00
|
|
|
|
2_131_750_927, // 0x7F0F_F00F
|
|
|
|
2_147_483_647, // 0x7FFF_FFFF
|
2019-08-04 10:21:52 +02:00
|
|
|
#[allow(overflowing_literals)]
|
2018-01-16 14:01:07 +01:00
|
|
|
4_042_322_160, // 0xF0F0_F0F0
|
|
|
|
);
|
|
|
|
}
|