]> git.lizzy.rs Git - rust.git/commitdiff
adjust run-fail tests
authorRalf Jung <post@ralfj.de>
Sat, 15 Feb 2020 18:02:36 +0000 (19:02 +0100)
committerRalf Jung <post@ralfj.de>
Sat, 15 Feb 2020 18:02:36 +0000 (19:02 +0100)
src/test/run-fail/mir_indexing_oob_1.rs
src/test/run-fail/mir_indexing_oob_2.rs
src/test/run-fail/mir_indexing_oob_3.rs
src/test/run-fail/overflowing-add.rs
src/test/run-fail/overflowing-mul.rs
src/test/run-fail/overflowing-neg.rs
src/test/run-fail/overflowing-sub.rs
src/test/run-fail/promoted_div_by_zero.rs
src/test/run-fail/promoted_overflow.rs

index 0ae0320b124bc843a6c56af35ff0d6942410c228..6aaf46cfb1bd8b989cfb367aface6dccee8f6cd4 100644 (file)
@@ -2,7 +2,7 @@
 
 const C: [u32; 5] = [0; 5];
 
-#[allow(const_err)]
+#[allow(panic, const_err)]
 fn test() -> u32 {
     C[10]
 }
index a7a1177260c31b5880ac316091c83a11279bf5e0..1bf8459a06852928e49d8b987ce298cfd0f1011e 100644 (file)
@@ -2,7 +2,7 @@
 
 const C: &'static [u8; 5] = b"hello";
 
-#[allow(const_err)]
+#[allow(panic, const_err)]
 fn test() -> u8 {
     C[10]
 }
index 188460fff783281face8a48d25be5024723ae609..c13ca721ea877be35bb3a7d3b3c9be15dcd420bf 100644 (file)
@@ -2,7 +2,7 @@
 
 const C: &'static [u8; 5] = b"hello";
 
-#[allow(const_err)]
+#[allow(panic, const_err)]
 fn mir() -> u8 {
     C[10]
 }
index 24602aced9e429a3d202cfd28957329f930b383f..69d7779e13e8991458581b9bfd044a8a2a2e2fbb 100644 (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;
index 48110365a81df6d3a5612e7878295884e6d3e792..ef191c01586f71316b18054256d2677fa2e92c9a 100644 (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;
index c4afd74241eda07509433399dca80cee01c65ff9..443cddf53fb74762b8fc73e9754ab9a93411eafe 100644 (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;
index e3b111dd2bba6e0a2beb842b9ba8478442ad30c2..4f4a3eed8cc354c61a6d5817e89cae7f090dd456 100644 (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);
index 3fe51a19c20bb6fc7ae9ab81410d23041cf10eb9..0ad081f0314c8a2c56c3162f3be728c10cb72d0b 100644 (file)
@@ -1,4 +1,4 @@
-#![allow(const_err)]
+#![allow(panic, const_err)]
 
 // error-pattern: attempt to divide by zero
 
index 139bf54095970f0dd78bf5702959bd4ae8928017..a90f832ddd025f1d7f14236597d941211f981487 100644 (file)
@@ -1,4 +1,4 @@
-#![allow(const_err)]
+#![allow(overflow)]
 
 // error-pattern: overflow
 // compile-flags: -C overflow-checks=yes