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
+8-8
Original file line number
Diff line number
Diff line change
@@ -1,39 +1,39 @@
1
1
warning: literal out of range for i8
2
2
--> $DIR/type-overflow.rs:16:17
3
3
|
4
-
16 | let error = 255i8; //~WARNING literal out of range for i8
4
+
LL | let error = 255i8; //~WARNING literal out of range for i8
5
5
| ^^^^^
6
6
|
7
7
= note: #[warn(overflowing_literals)] on by default
8
8
9
9
warning: literal out of range for i8
10
10
--> $DIR/type-overflow.rs:21:16
11
11
|
12
-
21 | let fail = 0b1000_0001i8; //~WARNING literal out of range for i8
12
+
LL | let fail = 0b1000_0001i8; //~WARNING literal out of range for i8
13
13
| ^^^^^^^^^^^^^ help: consider using `u8` instead: `0b1000_0001u8`
14
14
|
15
15
= note: the literal `0b1000_0001i8` (decimal `129`) does not fit into an `i8` and will become `-127i8`
16
16
17
17
warning: literal out of range for i64
18
18
--> $DIR/type-overflow.rs:23:16
19
19
|
20
-
23 | let fail = 0x8000_0000_0000_0000i64; //~WARNING literal out of range for i64
20
+
LL | let fail = 0x8000_0000_0000_0000i64; //~WARNING literal out of range for i64
21
21
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `u64` instead: `0x8000_0000_0000_0000u64`
22
22
|
23
23
= note: the literal `0x8000_0000_0000_0000i64` (decimal `9223372036854775808`) does not fit into an `i64` and will become `-9223372036854775808i64`
24
24
25
25
warning: literal out of range for u32
26
26
--> $DIR/type-overflow.rs:25:16
27
27
|
28
-
25 | let fail = 0x1_FFFF_FFFFu32; //~WARNING literal out of range for u32
28
+
LL | let fail = 0x1_FFFF_FFFFu32; //~WARNING literal out of range for u32
29
29
| ^^^^^^^^^^^^^^^^ help: consider using `u64` instead: `0x1_FFFF_FFFFu64`
30
30
|
31
31
= note: the literal `0x1_FFFF_FFFFu32` (decimal `8589934591`) does not fit into an `u32` and will become `4294967295u32`
32
32
33
33
warning: literal out of range for i128
34
34
--> $DIR/type-overflow.rs:27:22
35
35
|
36
-
27 | let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
36
+
LL | let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
37
37
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
38
|
39
39
= note: the literal `0x8000_0000_0000_0000_0000_0000_0000_0000` (decimal `170141183460469231731687303715884105728`) does not fit into an `i128` and will become `-170141183460469231731687303715884105728i128`
@@ -42,7 +42,7 @@ warning: literal out of range for i128
42
42
warning: literal out of range for i32
43
43
--> $DIR/type-overflow.rs:30:16
44
44
|
45
-
30 | let fail = 0x8FFF_FFFF_FFFF_FFFE; //~WARNING literal out of range for i32
45
+
LL | let fail = 0x8FFF_FFFF_FFFF_FFFE; //~WARNING literal out of range for i32
46
46
| ^^^^^^^^^^^^^^^^^^^^^
47
47
|
48
48
= note: the literal `0x8FFF_FFFF_FFFF_FFFE` (decimal `10376293541461622782`) does not fit into an `i32` and will become `-2i32`
@@ -51,15 +51,15 @@ warning: literal out of range for i32
51
51
warning: literal out of range for isize
52
52
--> $DIR/type-overflow.rs:32:23
53
53
|
54
-
32 | let fail: isize = 0x8000_0000_0000_0000; //~WARNING literal out of range for isize
54
+
LL | let fail: isize = 0x8000_0000_0000_0000; //~WARNING literal out of range for isize
55
55
| ^^^^^^^^^^^^^^^^^^^^^
56
56
|
57
57
= note: the literal `0x8000_0000_0000_0000` (decimal `9223372036854775808`) does not fit into an `isize` and will become `-9223372036854775808isize`
58
58
59
59
warning: literal out of range for i8
60
60
--> $DIR/type-overflow.rs:34:17
61
61
|
62
-
34 | let fail = -0b1111_1111i8; //~WARNING literal out of range for i8
62
+
LL | let fail = -0b1111_1111i8; //~WARNING literal out of range for i8
63
63
| ^^^^^^^^^^^^^ help: consider using `i16` instead: `0b1111_1111i16`
64
64
|
65
65
= note: the literal `0b1111_1111i8` (decimal `255`) does not fit into an `i8` and will become `-1i8`
0 commit comments