1
Fork 0

Update compile-fail tests

This commit is contained in:
Oliver Schneider 2018-02-06 14:15:36 +01:00
parent f68dc0190a
commit f363e08c9d
No known key found for this signature in database
GPG key ID: A69F8D225B3AD7D9
9 changed files with 24 additions and 89 deletions

View file

@ -22,65 +22,49 @@ use std::{i8, i16, i32, i64, isize};
use std::{u8, u16, u32, u64, usize};
const VALS_I8: (i8,) =
//~^ ERROR constant evaluation error
//~| ERROR constant evaluation error
//~| attempt to add with overflow
(
i8::MAX + 1,
//~^ ERROR constant evaluation error
);
const VALS_I16: (i16,) =
//~^ ERROR constant evaluation error
//~| ERROR constant evaluation error
//~| attempt to add with overflow
(
i16::MAX + 1,
//~^ ERROR constant evaluation error
);
const VALS_I32: (i32,) =
//~^ ERROR constant evaluation error
//~| ERROR constant evaluation error
//~| attempt to add with overflow
(
i32::MAX + 1,
//~^ ERROR constant evaluation error
);
const VALS_I64: (i64,) =
//~^ ERROR constant evaluation error
//~| ERROR constant evaluation error
//~| attempt to add with overflow
(
i64::MAX + 1,
//~^ ERROR constant evaluation error
);
const VALS_U8: (u8,) =
//~^ ERROR constant evaluation error
//~| ERROR constant evaluation error
//~| attempt to add with overflow
(
u8::MAX + 1,
//~^ ERROR constant evaluation error
);
const VALS_U16: (u16,) = (
//~^ ERROR constant evaluation error
//~| ERROR constant evaluation error
//~| attempt to add with overflow
u16::MAX + 1,
//~^ ERROR constant evaluation error
);
const VALS_U32: (u32,) = (
//~^ ERROR constant evaluation error
//~| ERROR constant evaluation error
//~| attempt to add with overflow
u32::MAX + 1,
//~^ ERROR constant evaluation error
);
const VALS_U64: (u64,) =
//~^ ERROR constant evaluation error
//~| ERROR constant evaluation error
//~| attempt to add with overflow
(
u64::MAX + 1,
//~^ ERROR constant evaluation error
);
fn main() {