diff options
| author | Soni L <EnderMoneyMod@gmail.com> | 2022-04-11 17:56:27 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-11 17:56:27 -0300 |
| commit | 8d5a4963df609e27d8daff49cee792f200e03408 (patch) | |
| tree | bb714d79d31fd7ea29a956decd0f187de92ffcb1 | |
| parent | 625e4dd13a3abd0cc59807af66c3c4cd63440852 (diff) | |
| download | rust-8d5a4963df609e27d8daff49cee792f200e03408.tar.gz rust-8d5a4963df609e27d8daff49cee792f200e03408.zip | |
Implement Default for AssertUnwindSafe
Trait impls are still insta-stable yeah...?
| -rw-r--r-- | library/core/src/panic/unwind_safe.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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 @@ impl<T: fmt::Debug> fmt::Debug for AssertUnwindSafe<T> { } } +#[stable(feature = "assertunwindsafe_default", since = "1.62.0")] +impl<T: Default> Default for AssertUnwindSafe<T> { + fn default() -> Self { + Self(Default::default()) + } +} + #[stable(feature = "futures_api", since = "1.36.0")] impl<F: Future> Future for AssertUnwindSafe<F> { type Output = F::Output; |
