From d018a8b6248a15e871c2220296c1fa639d6267c6 Mon Sep 17 00:00:00 2001 From: Charisee Date: Fri, 4 Feb 2022 19:55:55 +0000 Subject: [PATCH] remove mention of cfg_panic from library tests --- library/core/tests/array.rs | 3 --- library/core/tests/iter/adapters/zip.rs | 1 - library/core/tests/mem.rs | 2 -- 3 files changed, 6 deletions(-) diff --git a/library/core/tests/array.rs b/library/core/tests/array.rs index a778779c0fd..ee8435e6d6c 100644 --- a/library/core/tests/array.rs +++ b/library/core/tests/array.rs @@ -392,7 +392,6 @@ enum SomeError { assert_eq!(another_array, Err(SomeError::Foo)); } -#[cfg(not(panic = "abort"))] #[test] fn array_try_from_fn_drops_inserted_elements_on_err() { static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0); @@ -416,7 +415,6 @@ fn drop(&mut self) { assert_eq!(DROP_COUNTER.load(Ordering::SeqCst), 2); } -#[cfg(not(panic = "abort"))] #[test] fn array_try_from_fn_drops_inserted_elements_on_panic() { static DROP_COUNTER: AtomicUsize = AtomicUsize::new(0); @@ -440,7 +438,6 @@ fn drop(&mut self) { assert_eq!(DROP_COUNTER.load(Ordering::SeqCst), 2); } -#[cfg(not(panic = "abort"))] // https://stackoverflow.com/a/59211505 fn catch_unwind_silent(f: F) -> std::thread::Result where diff --git a/library/core/tests/iter/adapters/zip.rs b/library/core/tests/iter/adapters/zip.rs index 585cfbb90e4..58563e2061c 100644 --- a/library/core/tests/iter/adapters/zip.rs +++ b/library/core/tests/iter/adapters/zip.rs @@ -233,7 +233,6 @@ fn assert_trusted_random_access(_a: &T) {} } #[test] -#[cfg(panic = "unwind")] fn test_zip_trusted_random_access_next_back_drop() { use std::panic::catch_unwind; use std::panic::AssertUnwindSafe; diff --git a/library/core/tests/mem.rs b/library/core/tests/mem.rs index 3b13dc0832f..f878017c977 100644 --- a/library/core/tests/mem.rs +++ b/library/core/tests/mem.rs @@ -1,6 +1,5 @@ use core::mem::*; -#[cfg(panic = "unwind")] use std::rc::Rc; #[test] @@ -190,7 +189,6 @@ fn uninit_write_slice_cloned_panic_gt() { } #[test] -#[cfg(panic = "unwind")] fn uninit_write_slice_cloned_mid_panic() { use std::panic;