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
#![feature(i128_type)]fnmain(){
-0x8000_0000_0000_0000i64;// ok
-0x8000_0000_0000_0000_0000_0000_0000_0000i128;// Error: attempt to negate with overflow}
Gives error:
error[E0080]: constant evaluation error
--> foo.rs:4:5
|
4 | -0x8000_0000_0000_0000_0000_0000_0000_0000i128; // Error: attempt to negate with overflow
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to negate with overflow
error: aborting due to previous error
It should compiles fine and the constant should produce the same value as i128::MIN.
For comparison the minimum i64 compiles fine with no warnings.