From 8d5a4963df609e27d8daff49cee792f200e03408 Mon Sep 17 00:00:00 2001 From: Soni L Date: Mon, 11 Apr 2022 17:56:27 -0300 Subject: [PATCH] Implement Default for AssertUnwindSafe Trait impls are still insta-stable yeah...? --- library/core/src/panic/unwind_safe.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/library/core/src/panic/unwind_safe.rs b/library/core/src/panic/unwind_safe.rs index 95be879e319..f2948aac3c2 100644 --- a/library/core/src/panic/unwind_safe.rs +++ b/library/core/src/panic/unwind_safe.rs @@ -279,6 +279,13 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { } } +#[stable(feature = "assertunwindsafe_default", since = "1.62.0")] +impl Default for AssertUnwindSafe { + fn default() -> Self { + Self(Default::default()) + } +} + #[stable(feature = "futures_api", since = "1.36.0")] impl Future for AssertUnwindSafe { type Output = F::Output;