From ed1439cea48144dcdfee84ccd8d7b0d0edb9f64e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 27 Jul 2020 11:22:36 +0200 Subject: [PATCH] Fix RefUnwindSafe & UnwinsSafe impls for lazy::SyncLazy The logic here is the same as for Send&Sync impls. --- library/std/src/lazy.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/std/src/lazy.rs b/library/std/src/lazy.rs index 1705a4f77c555..60eba96bcc015 100644 --- a/library/std/src/lazy.rs +++ b/library/std/src/lazy.rs @@ -451,7 +451,9 @@ unsafe impl Sync for SyncLazy where SyncOnceCell: Sync {} // auto-derived `Send` impl is OK. #[unstable(feature = "once_cell", issue = "74465")] -impl RefUnwindSafe for SyncLazy where SyncOnceCell: RefUnwindSafe {} +impl RefUnwindSafe for SyncLazy where SyncOnceCell: RefUnwindSafe {} +#[unstable(feature = "once_cell", issue = "74465")] +impl UnwindSafe for SyncLazy where SyncOnceCell: UnwindSafe {} impl SyncLazy { /// Creates a new lazy value with the given initializing