about summary refs log tree commit diff
path: root/library/std/src/lazy.rs
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2020-07-27 11:22:36 +0200
committerAleksey Kladov <aleksey.kladov@gmail.com>2020-07-28 09:51:08 +0200
commited1439cea48144dcdfee84ccd8d7b0d0edb9f64e (patch)
tree4125f1c4e42e52b2f978f6314f8bdecbbe4955bb /library/std/src/lazy.rs
parent1454bbd4fdac9b7272b93fe82860613dccc0afad (diff)
downloadrust-ed1439cea48144dcdfee84ccd8d7b0d0edb9f64e.tar.gz
rust-ed1439cea48144dcdfee84ccd8d7b0d0edb9f64e.zip
Fix RefUnwindSafe & UnwinsSafe impls for lazy::SyncLazy
The logic here is the same as for Send&Sync impls.
Diffstat (limited to 'library/std/src/lazy.rs')
-rw-r--r--library/std/src/lazy.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/std/src/lazy.rs b/library/std/src/lazy.rs
index 1705a4f77c5..60eba96bcc0 100644
--- a/library/std/src/lazy.rs
+++ b/library/std/src/lazy.rs
@@ -451,7 +451,9 @@ unsafe impl<T, F: Send> Sync for SyncLazy<T, F> where SyncOnceCell<T>: Sync {}
 // auto-derived `Send` impl is OK.
 
 #[unstable(feature = "once_cell", issue = "74465")]
-impl<T, F: RefUnwindSafe> RefUnwindSafe for SyncLazy<T, F> where SyncOnceCell<T>: RefUnwindSafe {}
+impl<T, F: UnwindSafe> RefUnwindSafe for SyncLazy<T, F> where SyncOnceCell<T>: RefUnwindSafe {}
+#[unstable(feature = "once_cell", issue = "74465")]
+impl<T, F: UnwindSafe> UnwindSafe for SyncLazy<T, F> where SyncOnceCell<T>: UnwindSafe {}
 
 impl<T, F> SyncLazy<T, F> {
     /// Creates a new lazy value with the given initializing