about summary refs log tree commit diff
path: root/src/liballoc/tests/binary_heap.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-10-17 06:47:18 +0000
committerbors <bors@rust-lang.org>2019-10-17 06:47:18 +0000
commita16dca337de610986252bb800953e57bf395863f (patch)
treee5131402f4c749fce140c40096be838c6fc033bd /src/liballoc/tests/binary_heap.rs
parent7e498005a12548a8fd396312affde05c4d3ca085 (diff)
parentc0aa7cb2b553f5c58102c6b95210c5adbb3518f3 (diff)
downloadrust-a16dca337de610986252bb800953e57bf395863f.tar.gz
rust-a16dca337de610986252bb800953e57bf395863f.zip
Auto merge of #65251 - tlively:emscripten-upstream-upgrade, r=tlively
Upgrade Emscripten targets to use upstream LLVM backend

 - Compatible with Emscripten 1.38.46-upstream or later upstream.
 - Refactors the Emscripten target spec to share code with other wasm
   targets.
 - Replaces the old incorrect wasm32 C call ABI with the correct one,
   preserving the old one as wasm32_bindgen_compat for wasm-bindgen
   compatibility.
 - Updates the varargs ABI used by Emscripten and deletes the old one.
 - Removes the obsolete wasm32-experimental-emscripten target.
 - Uses EMCC_CFLAGS on CI to avoid the timeout problems with #63649.

r? @alexcrichton
Diffstat (limited to 'src/liballoc/tests/binary_heap.rs')
-rw-r--r--src/liballoc/tests/binary_heap.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/liballoc/tests/binary_heap.rs b/src/liballoc/tests/binary_heap.rs
index 0685fa943c0..b8c720264d0 100644
--- a/src/liballoc/tests/binary_heap.rs
+++ b/src/liballoc/tests/binary_heap.rs
@@ -1,10 +1,5 @@
-use std::cmp;
 use std::collections::BinaryHeap;
 use std::collections::binary_heap::{Drain, PeekMut};
-use std::panic::{self, AssertUnwindSafe};
-use std::sync::atomic::{AtomicUsize, Ordering};
-
-use rand::{thread_rng, seq::SliceRandom};
 
 #[test]
 fn test_iterator() {
@@ -281,9 +276,15 @@ fn assert_covariance() {
 // even if the order may not be correct.
 //
 // Destructors must be called exactly once per element.
+// FIXME: re-enable emscripten once it can unwind again
 #[test]
-#[cfg(not(miri))] // Miri does not support catching panics
+#[cfg(not(any(miri, target_os = "emscripten")))] // Miri does not support catching panics
 fn panic_safe() {
+    use std::cmp;
+    use std::panic::{self, AssertUnwindSafe};
+    use std::sync::atomic::{AtomicUsize, Ordering};
+    use rand::{thread_rng, seq::SliceRandom};
+
     static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0);
 
     #[derive(Eq, PartialEq, Ord, Clone, Debug)]