Skip to content

Stabilize 128-bit integers 🎉 #49101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Mar 26, 2018
Prev Previous commit
Next Next commit
update test
  • Loading branch information
mark-i-m committed Mar 26, 2018
commit 1fd964b5cb305997ba3428d94e9d72da61ca4769
14 changes: 7 additions & 7 deletions src/test/ui/lint/type-overflow.stderr
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
warning: literal out of range for i8
--> $DIR/type-overflow.rs:16:17
--> $DIR/type-overflow.rs:14:17
|
LL | let error = 255i8; //~WARNING literal out of range for i8
| ^^^^^
|
= note: #[warn(overflowing_literals)] on by default

warning: literal out of range for i8
--> $DIR/type-overflow.rs:21:16
--> $DIR/type-overflow.rs:19:16
|
LL | let fail = 0b1000_0001i8; //~WARNING literal out of range for i8
| ^^^^^^^^^^^^^ help: consider using `u8` instead: `0b1000_0001u8`
|
= note: the literal `0b1000_0001i8` (decimal `129`) does not fit into an `i8` and will become `-127i8`

warning: literal out of range for i64
--> $DIR/type-overflow.rs:23:16
--> $DIR/type-overflow.rs:21:16
|
LL | let fail = 0x8000_0000_0000_0000i64; //~WARNING literal out of range for i64
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `u64` instead: `0x8000_0000_0000_0000u64`
|
= note: the literal `0x8000_0000_0000_0000i64` (decimal `9223372036854775808`) does not fit into an `i64` and will become `-9223372036854775808i64`

warning: literal out of range for u32
--> $DIR/type-overflow.rs:25:16
--> $DIR/type-overflow.rs:23:16
|
LL | let fail = 0x1_FFFF_FFFFu32; //~WARNING literal out of range for u32
| ^^^^^^^^^^^^^^^^ help: consider using `u64` instead: `0x1_FFFF_FFFFu64`
|
= note: the literal `0x1_FFFF_FFFFu32` (decimal `8589934591`) does not fit into an `u32` and will become `4294967295u32`

warning: literal out of range for i128
--> $DIR/type-overflow.rs:27:22
--> $DIR/type-overflow.rs:25:22
|
LL | let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -40,7 +40,7 @@ LL | let fail: i128 = 0x8000_0000_0000_0000_0000_0000_0000_0000;
= help: consider using `u128` instead

warning: literal out of range for i32
--> $DIR/type-overflow.rs:30:16
--> $DIR/type-overflow.rs:28:16
|
LL | let fail = 0x8FFF_FFFF_FFFF_FFFE; //~WARNING literal out of range for i32
| ^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -49,7 +49,7 @@ LL | let fail = 0x8FFF_FFFF_FFFF_FFFE; //~WARNING literal out of range for i
= help: consider using `i128` instead

warning: literal out of range for i8
--> $DIR/type-overflow.rs:32:17
--> $DIR/type-overflow.rs:30:17
|
LL | let fail = -0b1111_1111i8; //~WARNING literal out of range for i8
| ^^^^^^^^^^^^^ help: consider using `i16` instead: `0b1111_1111i16`
Expand Down