From 3134df22143a9d9304e2b835957db6f40f8950da Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 15 Feb 2020 19:02:36 +0100 Subject: [PATCH] adjust run-fail tests --- src/test/run-fail/mir_indexing_oob_1.rs | 2 +- src/test/run-fail/mir_indexing_oob_2.rs | 2 +- src/test/run-fail/mir_indexing_oob_3.rs | 2 +- src/test/run-fail/overflowing-add.rs | 2 +- src/test/run-fail/overflowing-mul.rs | 2 +- src/test/run-fail/overflowing-neg.rs | 2 +- src/test/run-fail/overflowing-sub.rs | 2 +- src/test/run-fail/promoted_div_by_zero.rs | 2 +- src/test/run-fail/promoted_overflow.rs | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/test/run-fail/mir_indexing_oob_1.rs b/src/test/run-fail/mir_indexing_oob_1.rs index 0ae0320b124..6aaf46cfb1b 100644 --- a/src/test/run-fail/mir_indexing_oob_1.rs +++ b/src/test/run-fail/mir_indexing_oob_1.rs @@ -2,7 +2,7 @@ const C: [u32; 5] = [0; 5]; -#[allow(const_err)] +#[allow(panic, const_err)] fn test() -> u32 { C[10] } diff --git a/src/test/run-fail/mir_indexing_oob_2.rs b/src/test/run-fail/mir_indexing_oob_2.rs index a7a1177260c..1bf8459a068 100644 --- a/src/test/run-fail/mir_indexing_oob_2.rs +++ b/src/test/run-fail/mir_indexing_oob_2.rs @@ -2,7 +2,7 @@ const C: &'static [u8; 5] = b"hello"; -#[allow(const_err)] +#[allow(panic, const_err)] fn test() -> u8 { C[10] } diff --git a/src/test/run-fail/mir_indexing_oob_3.rs b/src/test/run-fail/mir_indexing_oob_3.rs index 188460fff78..c13ca721ea8 100644 --- a/src/test/run-fail/mir_indexing_oob_3.rs +++ b/src/test/run-fail/mir_indexing_oob_3.rs @@ -2,7 +2,7 @@ const C: &'static [u8; 5] = b"hello"; -#[allow(const_err)] +#[allow(panic, const_err)] fn mir() -> u8 { C[10] } diff --git a/src/test/run-fail/overflowing-add.rs b/src/test/run-fail/overflowing-add.rs index 24602aced9e..69d7779e13e 100644 --- a/src/test/run-fail/overflowing-add.rs +++ b/src/test/run-fail/overflowing-add.rs @@ -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; diff --git a/src/test/run-fail/overflowing-mul.rs b/src/test/run-fail/overflowing-mul.rs index 48110365a81..ef191c01586 100644 --- a/src/test/run-fail/overflowing-mul.rs +++ b/src/test/run-fail/overflowing-mul.rs @@ -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; diff --git a/src/test/run-fail/overflowing-neg.rs b/src/test/run-fail/overflowing-neg.rs index c4afd74241e..443cddf53fb 100644 --- a/src/test/run-fail/overflowing-neg.rs +++ b/src/test/run-fail/overflowing-neg.rs @@ -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; diff --git a/src/test/run-fail/overflowing-sub.rs b/src/test/run-fail/overflowing-sub.rs index e3b111dd2bb..4f4a3eed8cc 100644 --- a/src/test/run-fail/overflowing-sub.rs +++ b/src/test/run-fail/overflowing-sub.rs @@ -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); diff --git a/src/test/run-fail/promoted_div_by_zero.rs b/src/test/run-fail/promoted_div_by_zero.rs index 3fe51a19c20..0ad081f0314 100644 --- a/src/test/run-fail/promoted_div_by_zero.rs +++ b/src/test/run-fail/promoted_div_by_zero.rs @@ -1,4 +1,4 @@ -#![allow(const_err)] +#![allow(panic, const_err)] // error-pattern: attempt to divide by zero diff --git a/src/test/run-fail/promoted_overflow.rs b/src/test/run-fail/promoted_overflow.rs index 139bf540959..a90f832ddd0 100644 --- a/src/test/run-fail/promoted_overflow.rs +++ b/src/test/run-fail/promoted_overflow.rs @@ -1,4 +1,4 @@ -#![allow(const_err)] +#![allow(overflow)] // error-pattern: overflow // compile-flags: -C overflow-checks=yes -- 2.44.0