@@ -23,49 +23,69 @@ error: inconsistent casing in hexadecimal literal
23
23
= note: `-D mixed-case-hex-literals` implied by `-D warnings`
24
24
25
25
error: integer type suffix should be separated by an underscore
26
- --> literals.rs:21:17
26
+ --> literals.rs:17:27
27
27
|
28
- 21 | let fail3 = 1234i32 ;
29
- | ^^^^^^^
28
+ 17 | let fail_multi_zero = 000123usize ;
29
+ | ^^^^ ^^^^^^^
30
30
|
31
31
= note: `-D unseparated-literal-suffix` implied by `-D warnings`
32
32
33
+ error: this is a decimal constant
34
+ --> literals.rs:17:27
35
+ |
36
+ 17 | let fail_multi_zero = 000123usize;
37
+ | ^^^^^^^^^^^
38
+ |
39
+ = note: `-D zero-prefixed-literal` implied by `-D warnings`
40
+ help: if you mean to use a decimal constant, remove the `0` to remove confusion:
41
+ | let fail_multi_zero = 123usize;
42
+ help: if you mean to use an octal constant, use `0o`:
43
+ | let fail_multi_zero = 0o123usize;
44
+
33
45
error: integer type suffix should be separated by an underscore
34
46
--> literals.rs:22:17
35
47
|
36
- 22 | let fail4 = 1234u32 ;
48
+ 22 | let fail3 = 1234i32 ;
37
49
| ^^^^^^^
38
50
|
39
51
= note: `-D unseparated-literal-suffix` implied by `-D warnings`
40
52
41
53
error: integer type suffix should be separated by an underscore
42
54
--> literals.rs:23:17
43
55
|
44
- 23 | let fail5 = 1234isize ;
45
- | ^^^^^^^^^
56
+ 23 | let fail4 = 1234u32 ;
57
+ | ^^^^^^^
46
58
|
47
59
= note: `-D unseparated-literal-suffix` implied by `-D warnings`
48
60
49
61
error: integer type suffix should be separated by an underscore
50
62
--> literals.rs:24:17
51
63
|
52
- 24 | let fail6 = 1234usize ;
64
+ 24 | let fail5 = 1234isize ;
53
65
| ^^^^^^^^^
54
66
|
55
67
= note: `-D unseparated-literal-suffix` implied by `-D warnings`
56
68
57
- error: float type suffix should be separated by an underscore
69
+ error: integer type suffix should be separated by an underscore
58
70
--> literals.rs:25:17
59
71
|
60
- 25 | let fail7 = 1.5f32;
72
+ 25 | let fail6 = 1234usize;
73
+ | ^^^^^^^^^
74
+ |
75
+ = note: `-D unseparated-literal-suffix` implied by `-D warnings`
76
+
77
+ error: float type suffix should be separated by an underscore
78
+ --> literals.rs:26:17
79
+ |
80
+ 26 | let fail7 = 1.5f32;
61
81
| ^^^^^^
62
82
|
63
83
= note: `-D unseparated-literal-suffix` implied by `-D warnings`
64
84
65
85
error: this is a decimal constant
66
- --> literals.rs:29 :17
86
+ --> literals.rs:30 :17
67
87
|
68
- 29 | let fail8 = 0123;
88
+ 30 | let fail8 = 0123;
69
89
| ^^^^
70
90
|
71
91
= note: `-D zero-prefixed-literal` implied by `-D warnings`
0 commit comments