about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThe8472 <git@infinite-source.de>2021-06-20 12:20:05 +0200
committerThe8472 <git@infinite-source.de>2021-06-20 12:20:05 +0200
commitb4734b7c38dc2b9e84dd0358114534f55bd1849e (patch)
tree28b6ddbbf9d56aff2d656c3c00f6539aa4bef47a
parent8b518542d042a0b046d44d5c2b754976481c80ce (diff)
downloadrust-b4734b7c38dc2b9e84dd0358114534f55bd1849e.tar.gz
rust-b4734b7c38dc2b9e84dd0358114534f55bd1849e.zip
disable test on platforms that don't support unwinding
-rw-r--r--library/core/tests/iter/adapters/zip.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/library/core/tests/iter/adapters/zip.rs b/library/core/tests/iter/adapters/zip.rs
index fce88daee19..585cfbb90e4 100644
--- a/library/core/tests/iter/adapters/zip.rs
+++ b/library/core/tests/iter/adapters/zip.rs
@@ -1,7 +1,5 @@
 use super::*;
 use core::iter::*;
-use std::panic::catch_unwind;
-use std::panic::AssertUnwindSafe;
 
 #[test]
 fn test_zip_nth() {
@@ -235,7 +233,11 @@ fn test_zip_trusted_random_access_composition() {
 }
 
 #[test]
+#[cfg(panic = "unwind")]
 fn test_zip_trusted_random_access_next_back_drop() {
+    use std::panic::catch_unwind;
+    use std::panic::AssertUnwindSafe;
+
     let mut counter = 0;
 
     let it = [42].iter().map(|e| {