1
+ error: integer type suffix should not be separated by an underscore
2
+ --> $DIR/literals.rs:12:15
3
+ |
4
+ LL | let ok4 = 0xab_cd_i32;
5
+ | ^^^^^^^^^^^ help: remove the underscore: `0xab_cd_i32`
6
+ |
7
+ = note: `-D clippy::separated-literal-suffix` implied by `-D warnings`
8
+
9
+ error: integer type suffix should not be separated by an underscore
10
+ --> $DIR/literals.rs:13:15
11
+ |
12
+ LL | let ok5 = 0xAB_CD_u32;
13
+ | ^^^^^^^^^^^ help: remove the underscore: `0xAB_CD_u32`
14
+
15
+ error: integer type suffix should not be separated by an underscore
16
+ --> $DIR/literals.rs:14:15
17
+ |
18
+ LL | let ok5 = 0xAB_CD_isize;
19
+ | ^^^^^^^^^^^^^ help: remove the underscore: `0xAB_CD_isize`
20
+
1
21
error: inconsistent casing in hexadecimal literal
2
- --> $DIR/literals.rs:14 :17
22
+ --> $DIR/literals.rs:15 :17
3
23
|
4
24
LL | let fail1 = 0xabCD;
5
25
| ^^^^^^
6
26
|
7
27
= note: `-D clippy::mixed-case-hex-literals` implied by `-D warnings`
8
28
29
+ error: integer type suffix should not be separated by an underscore
30
+ --> $DIR/literals.rs:16:17
31
+ |
32
+ LL | let fail2 = 0xabCD_u32;
33
+ | ^^^^^^^^^^ help: remove the underscore: `0xabCD_u32`
34
+
9
35
error: inconsistent casing in hexadecimal literal
10
- --> $DIR/literals.rs:15 :17
36
+ --> $DIR/literals.rs:16 :17
11
37
|
12
38
LL | let fail2 = 0xabCD_u32;
13
39
| ^^^^^^^^^^
14
40
41
+ error: integer type suffix should not be separated by an underscore
42
+ --> $DIR/literals.rs:17:17
43
+ |
44
+ LL | let fail2 = 0xabCD_isize;
45
+ | ^^^^^^^^^^^^ help: remove the underscore: `0xabCD_isize`
46
+
15
47
error: inconsistent casing in hexadecimal literal
16
- --> $DIR/literals.rs:16 :17
48
+ --> $DIR/literals.rs:17 :17
17
49
|
18
50
LL | let fail2 = 0xabCD_isize;
19
51
| ^^^^^^^^^^^^
20
52
53
+ error: integer type suffix should be separated by an underscore
54
+ --> $DIR/literals.rs:18:27
55
+ |
56
+ LL | let fail_multi_zero = 000_123usize;
57
+ | ^^^^^^^^^^^^ help: add an underscore: `000_123_usize`
58
+ |
59
+ = note: `-D clippy::unseparated-literal-suffix` implied by `-D warnings`
60
+
21
61
error: this is a decimal constant
22
- --> $DIR/literals.rs:17 :27
62
+ --> $DIR/literals.rs:18 :27
23
63
|
24
64
LL | let fail_multi_zero = 000_123usize;
25
65
| ^^^^^^^^^^^^
@@ -34,8 +74,14 @@ help: if you mean to use an octal constant, use `0o`
34
74
LL | let fail_multi_zero = 0o123usize;
35
75
| ~~~~~~~~~~
36
76
77
+ error: integer type suffix should not be separated by an underscore
78
+ --> $DIR/literals.rs:21:16
79
+ |
80
+ LL | let ok10 = 0_i64;
81
+ | ^^^^^ help: remove the underscore: `0_i64`
82
+
37
83
error: this is a decimal constant
38
- --> $DIR/literals.rs:21 :17
84
+ --> $DIR/literals.rs:22 :17
39
85
|
40
86
LL | let fail8 = 0123;
41
87
| ^^^^
@@ -49,39 +95,45 @@ help: if you mean to use an octal constant, use `0o`
49
95
LL | let fail8 = 0o123;
50
96
| ~~~~~
51
97
98
+ error: integer type suffix should not be separated by an underscore
99
+ --> $DIR/literals.rs:31:16
100
+ |
101
+ LL | let ok17 = 0x123_4567_8901_usize;
102
+ | ^^^^^^^^^^^^^^^^^^^^^ help: remove the underscore: `0x123_4567_8901_usize`
103
+
52
104
error: digits grouped inconsistently by underscores
53
- --> $DIR/literals.rs:33 :18
105
+ --> $DIR/literals.rs:34 :18
54
106
|
55
107
LL | let fail19 = 12_3456_21;
56
108
| ^^^^^^^^^^ help: consider: `12_345_621`
57
109
|
58
110
= note: `-D clippy::inconsistent-digit-grouping` implied by `-D warnings`
59
111
60
112
error: digits grouped inconsistently by underscores
61
- --> $DIR/literals.rs:34 :18
113
+ --> $DIR/literals.rs:35 :18
62
114
|
63
115
LL | let fail22 = 3__4___23;
64
116
| ^^^^^^^^^ help: consider: `3_423`
65
117
66
118
error: digits grouped inconsistently by underscores
67
- --> $DIR/literals.rs:35 :18
119
+ --> $DIR/literals.rs:36 :18
68
120
|
69
121
LL | let fail23 = 3__16___23;
70
122
| ^^^^^^^^^^ help: consider: `31_623`
71
123
72
124
error: digits of hex or binary literal not grouped by four
73
- --> $DIR/literals.rs:37 :18
125
+ --> $DIR/literals.rs:38 :18
74
126
|
75
127
LL | let fail24 = 0xAB_ABC_AB;
76
128
| ^^^^^^^^^^^ help: consider: `0x0ABA_BCAB`
77
129
|
78
130
= note: `-D clippy::unusual-byte-groupings` implied by `-D warnings`
79
131
80
132
error: digits of hex or binary literal not grouped by four
81
- --> $DIR/literals.rs:38 :18
133
+ --> $DIR/literals.rs:39 :18
82
134
|
83
135
LL | let fail25 = 0b01_100_101;
84
136
| ^^^^^^^^^^^^ help: consider: `0b0110_0101`
85
137
86
- error: aborting due to 10 previous errors
138
+ error: aborting due to 18 previous errors
87
139
0 commit comments