diff --git a/core/tests/lazy.rs b/core/tests/lazy.rs index 711511eaf4a5a..32d0ac51f0336 100644 --- a/core/tests/lazy.rs +++ b/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!());