diff options
Diffstat (limited to 'src/test/compile-fail/const-eval-overflow.rs')
| -rw-r--r-- | src/test/compile-fail/const-eval-overflow.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/compile-fail/const-eval-overflow.rs b/src/test/compile-fail/const-eval-overflow.rs index daa60955ad8..2a2fc2ef080 100644 --- a/src/test/compile-fail/const-eval-overflow.rs +++ b/src/test/compile-fail/const-eval-overflow.rs @@ -9,7 +9,6 @@ // except according to those terms. #![allow(unused_imports)] -#![feature(negate_unsigned)] // Note: the relevant lint pass here runs before some of the constant // evaluation below (e.g. that performed by trans and llvm), so if you @@ -65,7 +64,7 @@ const VALS_I64: (i64, i64, i64, i64) = ); const VALS_U8: (u8, u8, u8, u8) = - (-u8::MIN, + (-(u8::MIN as i8) as u8, u8::MIN - 1, //~^ ERROR attempted to sub with overflow u8::MAX + 1, @@ -75,7 +74,7 @@ const VALS_U8: (u8, u8, u8, u8) = ); const VALS_U16: (u16, u16, u16, u16) = - (-u16::MIN, + (-(u16::MIN as i16) as u16, u16::MIN - 1, //~^ ERROR attempted to sub with overflow u16::MAX + 1, @@ -85,7 +84,7 @@ const VALS_U16: (u16, u16, u16, u16) = ); const VALS_U32: (u32, u32, u32, u32) = - (-u32::MIN, + (-(u32::MIN as i32) as u32, u32::MIN - 1, //~^ ERROR attempted to sub with overflow u32::MAX + 1, @@ -95,7 +94,7 @@ const VALS_U32: (u32, u32, u32, u32) = ); const VALS_U64: (u64, u64, u64, u64) = - (-u64::MIN, + (-(u64::MIN as i64) as u64, u64::MIN - 1, //~^ ERROR attempted to sub with overflow u64::MAX + 1, |
