adjust run-fail tests

This commit is contained in:
Ralf Jung 2020-02-15 19:02:36 +01:00
parent 0c8c800f21
commit 3134df2214
9 changed files with 9 additions and 9 deletions

View File

@ -2,7 +2,7 @@
const C: [u32; 5] = [0; 5];
#[allow(const_err)]
#[allow(panic, const_err)]
fn test() -> u32 {
C[10]
}

View File

@ -2,7 +2,7 @@
const C: &'static [u8; 5] = b"hello";
#[allow(const_err)]
#[allow(panic, const_err)]
fn test() -> u8 {
C[10]
}

View File

@ -2,7 +2,7 @@
const C: &'static [u8; 5] = b"hello";
#[allow(const_err)]
#[allow(panic, const_err)]
fn mir() -> u8 {
C[10]
}

View File

@ -1,7 +1,7 @@
// error-pattern:thread 'main' panicked at 'attempt to add with overflow'
// compile-flags: -C debug-assertions
#![allow(const_err)]
#![allow(overflow)]
fn main() {
let _x = 200u8 + 200u8 + 200u8;

View File

@ -1,7 +1,7 @@
// error-pattern:thread 'main' panicked at 'attempt to multiply with overflow'
// compile-flags: -C debug-assertions
#![allow(const_err)]
#![allow(overflow)]
fn main() {
let x = 200u8 * 4;

View File

@ -1,7 +1,7 @@
// error-pattern:thread 'main' panicked at 'attempt to negate with overflow'
// compile-flags: -C debug-assertions
#![allow(const_err)]
#![allow(overflow)]
fn main() {
let _x = -std::i8::MIN;

View File

@ -1,7 +1,7 @@
// error-pattern:thread 'main' panicked at 'attempt to subtract with overflow'
// compile-flags: -C debug-assertions
#![allow(const_err)]
#![allow(overflow)]
fn main() {
let _x = 42u8 - (42u8 + 1);

View File

@ -1,4 +1,4 @@
#![allow(const_err)]
#![allow(panic, const_err)]
// error-pattern: attempt to divide by zero

View File

@ -1,4 +1,4 @@
#![allow(const_err)]
#![allow(overflow)]
// error-pattern: overflow
// compile-flags: -C overflow-checks=yes