2019-08-04 08:21:52 +00:00
|
|
|
#[warn(clippy::decimal_literal_representation)]
|
|
|
|
#[allow(unused_variables)]
|
|
|
|
#[rustfmt::skip]
|
|
|
|
fn main() {
|
|
|
|
let good = ( // Hex:
|
|
|
|
127, // 0x7F
|
|
|
|
256, // 0x100
|
|
|
|
511, // 0x1FF
|
|
|
|
2048, // 0x800
|
|
|
|
4090, // 0xFFA
|
|
|
|
16_371, // 0x3FF3
|
|
|
|
61_683, // 0xF0F3
|
|
|
|
2_131_750_925, // 0x7F0F_F00D
|
|
|
|
);
|
|
|
|
let bad = ( // Hex:
|
|
|
|
0x8005, // 0x8005
|
|
|
|
0xFF00, // 0xFF00
|
|
|
|
0x7F0F_F00F, // 0x7F0F_F00F
|
|
|
|
0x7FFF_FFFF, // 0x7FFF_FFFF
|
|
|
|
#[allow(overflowing_literals)]
|
|
|
|
0xF0F0_F0F0, // 0xF0F0_F0F0
|
2019-12-25 16:22:36 +00:00
|
|
|
0x8005_usize, // 0x8005_usize
|
|
|
|
0x7F0F_F00F_isize, // 0x7F0F_F00F_isize
|
2019-08-04 08:21:52 +00:00
|
|
|
);
|
|
|
|
}
|