about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/core/tests/lazy.rs1
1 files changed, 1 insertions, 0 deletions
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::<String>::new(|| panic!());