Skip to content

Commit 3134df2

Browse files
committed
adjust run-fail tests
1 parent 0c8c800 commit 3134df2

9 files changed

+9
-9
lines changed

src/test/run-fail/mir_indexing_oob_1.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const C: [u32; 5] = [0; 5];
44

5-
#[allow(const_err)]
5+
#[allow(panic, const_err)]
66
fn test() -> u32 {
77
C[10]
88
}

src/test/run-fail/mir_indexing_oob_2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const C: &'static [u8; 5] = b"hello";
44

5-
#[allow(const_err)]
5+
#[allow(panic, const_err)]
66
fn test() -> u8 {
77
C[10]
88
}

src/test/run-fail/mir_indexing_oob_3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const C: &'static [u8; 5] = b"hello";
44

5-
#[allow(const_err)]
5+
#[allow(panic, const_err)]
66
fn mir() -> u8 {
77
C[10]
88
}

src/test/run-fail/overflowing-add.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// error-pattern:thread 'main' panicked at 'attempt to add with overflow'
22
// compile-flags: -C debug-assertions
33

4-
#![allow(const_err)]
4+
#![allow(overflow)]
55

66
fn main() {
77
let _x = 200u8 + 200u8 + 200u8;

src/test/run-fail/overflowing-mul.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// error-pattern:thread 'main' panicked at 'attempt to multiply with overflow'
22
// compile-flags: -C debug-assertions
33

4-
#![allow(const_err)]
4+
#![allow(overflow)]
55

66
fn main() {
77
let x = 200u8 * 4;

src/test/run-fail/overflowing-neg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// error-pattern:thread 'main' panicked at 'attempt to negate with overflow'
22
// compile-flags: -C debug-assertions
33

4-
#![allow(const_err)]
4+
#![allow(overflow)]
55

66
fn main() {
77
let _x = -std::i8::MIN;

src/test/run-fail/overflowing-sub.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// error-pattern:thread 'main' panicked at 'attempt to subtract with overflow'
22
// compile-flags: -C debug-assertions
33

4-
#![allow(const_err)]
4+
#![allow(overflow)]
55

66
fn main() {
77
let _x = 42u8 - (42u8 + 1);

src/test/run-fail/promoted_div_by_zero.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(const_err)]
1+
#![allow(panic, const_err)]
22

33
// error-pattern: attempt to divide by zero
44

src/test/run-fail/promoted_overflow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![allow(const_err)]
1+
#![allow(overflow)]
22

33
// error-pattern: overflow
44
// compile-flags: -C overflow-checks=yes

0 commit comments

Comments
 (0)