- Fix regression of literal out of range check for negative i64 values which was introduced by commit 7b1916d253.
- Add missing test cases to test/compile-fail/lint-type-overflow.rs which would have detected the regression.
This commit is contained in:
parent
2bc0bf2586
commit
43502adf07
2 changed files with 6 additions and 2 deletions
|
|
@ -52,6 +52,8 @@ fn main() {
|
|||
let x = 9223372036854775808_i64; //~ error: literal out of range for i64
|
||||
let x = -9223372036854775808_i64; // should be OK
|
||||
let x = 18446744073709551615_i64; //~ error: literal out of range for i64
|
||||
let x: i64 = -9223372036854775809; //~ error: literal out of range for i64
|
||||
let x = -9223372036854775809_i64; //~ error: literal out of range for i64
|
||||
|
||||
let x = -3.40282348e+38_f32; //~ error: literal out of range for f32
|
||||
let x = 3.40282348e+38_f32; //~ error: literal out of range for f32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue