1
Fork 0

Unify the const folding errors

before they differed depending on whether optimizations were on or not
This commit is contained in:
Oliver Schneider 2018-03-06 12:43:02 +01:00
parent edc5f73433
commit b5ace9a906
No known key found for this signature in database
GPG key ID: A69F8D225B3AD7D9
24 changed files with 279 additions and 156 deletions

View file

@ -25,46 +25,54 @@ const VALS_I8: (i8,) =
(
i8::MIN - 1,
//~^ ERROR constant evaluation error
//~| ERROR attempt to subtract with overflow
);
const VALS_I16: (i16,) =
(
i16::MIN - 1,
//~^ ERROR constant evaluation error
//~| ERROR attempt to subtract with overflow
);
const VALS_I32: (i32,) =
(
i32::MIN - 1,
//~^ ERROR constant evaluation error
//~| ERROR attempt to subtract with overflow
);
const VALS_I64: (i64,) =
(
i64::MIN - 1,
//~^ ERROR constant evaluation error
//~| ERROR attempt to subtract with overflow
);
const VALS_U8: (u8,) =
(
u8::MIN - 1,
//~^ ERROR constant evaluation error
//~| ERROR attempt to subtract with overflow
);
const VALS_U16: (u16,) = (
u16::MIN - 1,
//~^ ERROR constant evaluation error
//~| ERROR attempt to subtract with overflow
);
const VALS_U32: (u32,) = (
u32::MIN - 1,
//~^ ERROR constant evaluation error
//~| ERROR attempt to subtract with overflow
);
const VALS_U64: (u64,) =
(
u64::MIN - 1,
//~^ ERROR constant evaluation error
//~| ERROR attempt to subtract with overflow
);
fn main() {