Update compile-fail tests
This commit is contained in:
parent
f68dc0190a
commit
f363e08c9d
9 changed files with 24 additions and 89 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue