about summary refs log tree commit diff
path: root/src/liballoc/tests/vec.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-01 04:49:21 +0100
committerGitHub <noreply@github.com>2019-12-01 04:49:21 +0100
commitcb43d82fd65774a6e7bca5c3cd78381d3496b357 (patch)
tree20253ba70970ebebb2b7bf4993d1331d6d52fdd4 /src/liballoc/tests/vec.rs
parent6110d3ebc8224929c8f426def15b9443ffb3258d (diff)
parenta2299799e6193799f4d2cb546e56589c5dd587aa (diff)
downloadrust-cb43d82fd65774a6e7bca5c3cd78381d3496b357.tar.gz
rust-cb43d82fd65774a6e7bca5c3cd78381d3496b357.zip
Rollup merge of #66662 - RalfJung:miri-test-liballoc, r=dtolnay
Miri: run panic-catching tests in liballoc

I also converted two tests from using `thread::spawn(...).join()` just for catching panics, to `catch_panic`, so that Miri can run them.
Diffstat (limited to 'src/liballoc/tests/vec.rs')
-rw-r--r--src/liballoc/tests/vec.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/liballoc/tests/vec.rs b/src/liballoc/tests/vec.rs
index 0cc8da096f3..9ee254f99ac 100644
--- a/src/liballoc/tests/vec.rs
+++ b/src/liballoc/tests/vec.rs
@@ -944,10 +944,9 @@ fn drain_filter_complex() {
     }
 }
 
-// Miri does not support catching panics
 // FIXME: re-enable emscripten once it can unwind again
 #[test]
-#[cfg(not(any(miri, target_os = "emscripten")))]
+#[cfg(not(target_os = "emscripten"))]
 fn drain_filter_consumed_panic() {
     use std::rc::Rc;
     use std::sync::Mutex;
@@ -999,7 +998,7 @@ fn drain_filter_consumed_panic() {
 
 // FIXME: Re-enable emscripten once it can catch panics
 #[test]
-#[cfg(not(any(miri, target_os = "emscripten")))] // Miri does not support catching panics
+#[cfg(not(target_os = "emscripten"))]
 fn drain_filter_unconsumed_panic() {
     use std::rc::Rc;
     use std::sync::Mutex;