1 // Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
11 #![feature(tool_lints)]
13 #![warn(clippy::mixed_case_hex_literals)]
14 #![warn(clippy::unseparated_literal_suffix)]
15 #![warn(clippy::zero_prefixed_literal)]
21 let ok4 = 0xab_cd_i32;
22 let ok5 = 0xAB_CD_u32;
23 let ok5 = 0xAB_CD_isize;
25 let fail2 = 0xabCD_u32;
26 let fail2 = 0xabCD_isize;
27 let fail_multi_zero = 000_123usize;
34 let fail5 = 1234isize;
35 let fail6 = 1234usize;
46 let ok14 = 0xBAFE_BAFE;
47 let ok15 = 0xab_cabc_abca_bcab_cabc;
48 let ok16 = 0xFE_BAFE_ABAB_ABCD;
49 let ok17 = 0x123_4567_8901_usize;
52 let fail10 = 0xBAFEBAFE;
53 let fail11 = 0xabcdeff;
54 let fail12 = 0xabcabcabcabcabcabc;
55 let fail13 = 0x1_23456_78901_usize;
62 let fail19 = 12_3456_21;
65 let fail22 = 3__4___23;
66 let fail23 = 3__16___23;