We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4961b10 commit 8ad6e5fCopy full SHA for 8ad6e5f
library/std/src/sync/once.rs
@@ -90,6 +90,7 @@ mod tests;
90
use crate::cell::Cell;
91
use crate::fmt;
92
use crate::marker;
93
+use crate::panic::UnwindSafe;
94
use crate::sync::atomic::{AtomicBool, AtomicUsize, Ordering};
95
use crate::thread::{self, Thread};
96
@@ -123,6 +124,9 @@ unsafe impl Sync for Once {}
123
124
#[stable(feature = "rust1", since = "1.0.0")]
125
unsafe impl Send for Once {}
126
127
+#[stable(feature = "sync_once_ref_unwind_safe", since = "1.59.0")]
128
+impl UnwindSafe for Once {}
129
+
130
/// State yielded to [`Once::call_once_force()`]’s closure parameter. The state
131
/// can be used to query the poison status of the [`Once`].
132
#[stable(feature = "once_poison", since = "1.51.0")]
0 commit comments