You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/test/ui/lint/type-overflow.stderr
+13-17
Original file line number
Diff line number
Diff line change
@@ -10,61 +10,57 @@ warning: literal out of range for i8
10
10
--> $DIR/type-overflow.rs:21:16
11
11
|
12
12
21 | let fail = 0b1000_0001i8; //~WARNING literal out of range for i8
13
-
| ^^^^^^^^^^^^^
13
+
| ^^^^^^^^^^^^^ help: consider using `u8` instead: `0b1000_0001u8`
14
14
|
15
-
= note: the literal `0b1000_0001i8` (decimal `129`) does not fit into an `i8` and will become `-127i8`.
16
-
= help: Consider using `u8`
15
+
= note: the literal `0b1000_0001i8` (decimal `129`) does not fit into an `i8` and will become `-127i8`
17
16
18
17
warning: literal out of range for i64
19
18
--> $DIR/type-overflow.rs:23:16
20
19
|
21
20
23 | let fail = 0x8000_0000_0000_0000i64; //~WARNING literal out of range for i64
22
-
| ^^^^^^^^^^^^^^^^^^^^^^^^
21
+
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `u64` instead: `0x8000_0000_0000_0000u64`
23
22
|
24
-
= note: the literal `0x8000_0000_0000_0000i64` (decimal `9223372036854775808`) does not fit into an `i64` and will become `-9223372036854775808i64`.
25
-
= help: Consider using `u64`
23
+
= note: the literal `0x8000_0000_0000_0000i64` (decimal `9223372036854775808`) does not fit into an `i64` and will become `-9223372036854775808i64`
26
24
27
25
warning: literal out of range for u32
28
26
--> $DIR/type-overflow.rs:25:16
29
27
|
30
28
25 | let fail = 0x1_FFFF_FFFFu32; //~WARNING literal out of range for u32
31
-
| ^^^^^^^^^^^^^^^^
29
+
| ^^^^^^^^^^^^^^^^ help: consider using `u64` instead: `0x1_FFFF_FFFFu64`
32
30
|
33
-
= note: the literal `0x1_FFFF_FFFFu32` (decimal `8589934591`) does not fit into an `u32` and will become `4294967295u32`.
34
-
= help: Consider using `u64`
31
+
= note: the literal `0x1_FFFF_FFFFu32` (decimal `8589934591`) does not fit into an `u32` and will become `4294967295u32`
35
32
36
33
warning: literal out of range for i128
37
34
--> $DIR/type-overflow.rs:27:22
38
35
|
39
36
27 | let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
40
37
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41
38
|
42
-
= note: the literal `0x8000_0000_0000_0000_0000_0000_0000_0000` (decimal `170141183460469231731687303715884105728`) does not fit into an `i128` and will become `-170141183460469231731687303715884105728i128`.
43
-
= help: Consider using `u128`
39
+
= note: the literal `0x8000_0000_0000_0000_0000_0000_0000_0000` (decimal `170141183460469231731687303715884105728`) does not fit into an `i128` and will become `-170141183460469231731687303715884105728i128`
40
+
= help: consider using `u128` instead
44
41
45
42
warning: literal out of range for i32
46
43
--> $DIR/type-overflow.rs:30:16
47
44
|
48
45
30 | let fail = 0x8FFF_FFFF_FFFF_FFFE; //~WARNING literal out of range for i32
49
46
| ^^^^^^^^^^^^^^^^^^^^^
50
47
|
51
-
= note: the literal `0x8FFF_FFFF_FFFF_FFFE` (decimal `10376293541461622782`) does not fit into an `i32` and will become `-2i32`.
52
-
= help: Consider using `i128`
48
+
= note: the literal `0x8FFF_FFFF_FFFF_FFFE` (decimal `10376293541461622782`) does not fit into an `i32` and will become `-2i32`
49
+
= help: consider using `i128` instead
53
50
54
51
warning: literal out of range for isize
55
52
--> $DIR/type-overflow.rs:32:23
56
53
|
57
54
32 | let fail: isize = 0x8000_0000_0000_0000; //~WARNING literal out of range for isize
58
55
| ^^^^^^^^^^^^^^^^^^^^^
59
56
|
60
-
= note: the literal `0x8000_0000_0000_0000` (decimal `9223372036854775808`) does not fit into an `isize` and will become `-9223372036854775808isize`.
57
+
= note: the literal `0x8000_0000_0000_0000` (decimal `9223372036854775808`) does not fit into an `isize` and will become `-9223372036854775808isize`
61
58
62
59
warning: literal out of range for i8
63
60
--> $DIR/type-overflow.rs:34:17
64
61
|
65
62
34 | let fail = -0b1111_1111i8; //~WARNING literal out of range for i8
66
-
| ^^^^^^^^^^^^^
63
+
| ^^^^^^^^^^^^^ help: consider using `i16` instead: `0b1111_1111i16`
67
64
|
68
-
= note: the literal `0b1111_1111i8` (decimal `255`) does not fit into an `i8` and will become `-1i8`.
69
-
= help: Consider using `i16`
65
+
= note: the literal `0b1111_1111i8` (decimal `255`) does not fit into an `i8` and will become `-1i8`
0 commit comments