@@ -11,32 +11,28 @@ fn main() {
11
11
let ok1 = 0xABCD ;
12
12
let ok3 = 0xab_cd ;
13
13
let ok4 = 0xab_cd_i32 ;
14
- //~^ ERROR: integer type suffix should not be separated by an underscore
15
- //~| NOTE: `-D clippy::separated-literal-suffix` implied by `-D warnings`
14
+ //~^ separated_literal_suffix
16
15
let ok5 = 0xAB_CD_u32 ;
17
- //~^ ERROR: integer type suffix should not be separated by an underscore
16
+ //~^ separated_literal_suffix
18
17
let ok5 = 0xAB_CD_isize ;
19
- //~^ ERROR: integer type suffix should not be separated by an underscore
18
+ //~^ separated_literal_suffix
20
19
let fail1 = 0xabCD ;
21
- //~^ ERROR: inconsistent casing in hexadecimal literal
22
- //~| NOTE: `-D clippy::mixed-case-hex-literals` implied by `-D warnings`
20
+ //~^ mixed_case_hex_literals
23
21
let fail2 = 0xabCD_u32 ;
24
- //~^ ERROR: integer type suffix should not be separated by an underscore
25
- //~| ERROR: inconsistent casing in hexadecimal literal
22
+ //~^ mixed_case_hex_literals
23
+ //~| separated_literal_suffix
26
24
let fail2 = 0xabCD_isize ;
27
- //~^ ERROR: integer type suffix should not be separated by an underscore
28
- //~| ERROR: inconsistent casing in hexadecimal literal
25
+ //~^ separated_literal_suffix
26
+ //~| mixed_case_hex_literals
29
27
let fail_multi_zero = 000_123usize ;
30
- //~^ ERROR: integer type suffix should be separated by an underscore
31
- //~| NOTE: `-D clippy::unseparated-literal-suffix` implied by `-D warnings`
32
- //~| ERROR: this is a decimal constant
33
- //~| NOTE: `-D clippy::zero-prefixed-literal` implied by `-D warnings`
28
+ //~^ zero_prefixed_literal
29
+ //~| unseparated_literal_suffix
34
30
35
31
let ok9 = 0 ;
36
32
let ok10 = 0_i64 ;
37
- //~^ ERROR: integer type suffix should not be separated by an underscore
33
+ //~^ separated_literal_suffix
38
34
let fail8 = 0123 ;
39
- //~^ ERROR: this is a decimal constant
35
+ //~^ zero_prefixed_literal
40
36
41
37
let ok11 = 0o123 ;
42
38
let ok12 = 0b10_1010 ;
@@ -46,20 +42,18 @@ fn main() {
46
42
let ok15 = 0xab_cabc_abca_bcab_cabc ;
47
43
let ok16 = 0xFE_BAFE_ABAB_ABCD ;
48
44
let ok17 = 0x123_4567_8901_usize ;
49
- //~^ ERROR: integer type suffix should not be separated by an underscore
45
+ //~^ separated_literal_suffix
50
46
let ok18 = 0xF ;
51
47
52
48
let fail19 = 12_3456_21 ;
53
- //~^ ERROR: digits grouped inconsistently by underscores
54
- //~| NOTE: `-D clippy::inconsistent-digit-grouping` implied by `-D warnings`
49
+ //~^ inconsistent_digit_grouping
55
50
let fail22 = 3__4___23 ;
56
- //~^ ERROR: digits grouped inconsistently by underscores
51
+ //~^ inconsistent_digit_grouping
57
52
let fail23 = 3__16___23 ;
58
- //~^ ERROR: digits grouped inconsistently by underscores
53
+ //~^ inconsistent_digit_grouping
59
54
60
55
let fail24 = 0xAB_ABC_AB ;
61
- //~^ ERROR: digits of hex, binary or octal literal not in groups of equal size
62
- //~| NOTE: `-D clippy::unusual-byte-groupings` implied by `-D warnings`
56
+ //~^ unusual_byte_groupings
63
57
let fail25 = 0b01_100_101 ;
64
58
let ok26 = 0x6_A0_BF ;
65
59
let ok27 = 0b1_0010_0101 ;
@@ -68,9 +62,9 @@ fn main() {
68
62
fn issue9651 ( ) {
69
63
// lint but octal form is not possible here
70
64
let _ = 08 ;
71
- //~^ ERROR: this is a decimal constant
65
+ //~^ zero_prefixed_literal
72
66
let _ = 09 ;
73
- //~^ ERROR: this is a decimal constant
67
+ //~^ zero_prefixed_literal
74
68
let _ = 089 ;
75
- //~^ ERROR: this is a decimal constant
69
+ //~^ zero_prefixed_literal
76
70
}
0 commit comments