about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2021-12-20 11:49:47 -0800
committerDavid Tolnay <dtolnay@gmail.com>2021-12-20 11:49:47 -0800
commit91161ed110c87b6e2dba08269e45509e317fbc73 (patch)
tree159b495eece007cd7d687dce6f73c909a52b5f35
parent8ad6e5fb671a2343b81aee29cb344f4804bbb0f4 (diff)
downloadrust-91161ed110c87b6e2dba08269e45509e317fbc73.tar.gz
rust-91161ed110c87b6e2dba08269e45509e317fbc73.zip
impl RefUnwindSafe for Once
-rw-r--r--library/std/src/sync/once.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/library/std/src/sync/once.rs b/library/std/src/sync/once.rs
index 47921283b21..f76d0759561 100644
--- a/library/std/src/sync/once.rs
+++ b/library/std/src/sync/once.rs
@@ -90,7 +90,7 @@ mod tests;
 use crate::cell::Cell;
 use crate::fmt;
 use crate::marker;
-use crate::panic::UnwindSafe;
+use crate::panic::{RefUnwindSafe, UnwindSafe};
 use crate::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
 use crate::thread::{self, Thread};
 
@@ -124,9 +124,12 @@ unsafe impl Sync for Once {}
 #[stable(feature = "rust1", since = "1.0.0")]
 unsafe impl Send for Once {}
 
-#[stable(feature = "sync_once_ref_unwind_safe", since = "1.59.0")]
+#[stable(feature = "sync_once_unwind_safe", since = "1.59.0")]
 impl UnwindSafe for Once {}
 
+#[stable(feature = "sync_once_unwind_safe", since = "1.59.0")]
+impl RefUnwindSafe for Once {}
+
 /// State yielded to [`Once::call_once_force()`]’s closure parameter. The state
 /// can be used to query the poison status of the [`Once`].
 #[stable(feature = "once_poison", since = "1.51.0")]