2017-09-18 05:47:33 -05:00
|
|
|
|
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
#![warn(mixed_case_hex_literals)]
|
|
|
|
#![warn(unseparated_literal_suffix)]
|
|
|
|
#![warn(zero_prefixed_literal)]
|
2016-08-05 11:30:07 -05:00
|
|
|
#![allow(dead_code)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let ok1 = 0xABCD;
|
|
|
|
let ok3 = 0xab_cd;
|
|
|
|
let ok4 = 0xab_cd_i32;
|
|
|
|
let ok5 = 0xAB_CD_u32;
|
|
|
|
let ok5 = 0xAB_CD_isize;
|
2017-02-08 07:58:07 -06:00
|
|
|
let fail1 = 0xabCD;
|
|
|
|
let fail2 = 0xabCD_u32;
|
|
|
|
let fail2 = 0xabCD_isize;
|
2017-07-19 18:56:32 -05:00
|
|
|
let fail_multi_zero = 000_123usize;
|
2016-08-05 11:50:02 -05:00
|
|
|
|
|
|
|
let ok6 = 1234_i32;
|
|
|
|
let ok7 = 1234_f32;
|
|
|
|
let ok8 = 1234_isize;
|
2017-02-08 07:58:07 -06:00
|
|
|
let fail3 = 1234i32;
|
|
|
|
let fail4 = 1234u32;
|
|
|
|
let fail5 = 1234isize;
|
|
|
|
let fail6 = 1234usize;
|
|
|
|
let fail7 = 1.5f32;
|
2016-08-20 11:11:15 -05:00
|
|
|
|
|
|
|
let ok9 = 0;
|
|
|
|
let ok10 = 0_i64;
|
|
|
|
let fail8 = 0123;
|
2017-02-08 07:58:07 -06:00
|
|
|
|
2016-08-28 10:59:01 -05:00
|
|
|
let ok11 = 0o123;
|
2017-07-19 18:56:32 -05:00
|
|
|
let ok12 = 0b10_1010;
|
2016-08-05 11:30:07 -05:00
|
|
|
}
|