From f999ab86e05431a7e7d109e9bfde991d8817f98b Mon Sep 17 00:00:00 2001 From: Amanjeev Sethi Date: Thu, 17 Oct 2024 09:33:39 -0400 Subject: [PATCH] Do not run test where it cannot run This was seen on Ferrocene, where we have a custom test target that does not have unwind support --- library/core/tests/lazy.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/core/tests/lazy.rs b/library/core/tests/lazy.rs index 711511eaf4a..32d0ac51f03 100644 --- a/library/core/tests/lazy.rs +++ b/library/core/tests/lazy.rs @@ -114,6 +114,7 @@ fn lazy_type_inference() { } #[test] +#[cfg(panic = "unwind")] #[should_panic = "LazyCell instance has previously been poisoned"] fn lazy_force_mut_panic() { let mut lazy = LazyCell::::new(|| panic!());