mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-17 09:23:05 +00:00
impl RefUnwindSafe for Once
This commit is contained in:
parent
8ad6e5fb67
commit
91161ed110
@ -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")]
|
||||
|
Loading…
Reference in New Issue
Block a user