File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ mod tests;
9090use crate :: cell:: Cell ;
9191use crate :: fmt;
9292use crate :: marker;
93+ use crate :: panic:: { RefUnwindSafe , UnwindSafe } ;
9394use crate :: sync:: atomic:: { AtomicBool , AtomicUsize , Ordering } ;
9495use crate :: thread:: { self , Thread } ;
9596
@@ -123,6 +124,12 @@ unsafe impl Sync for Once {}
123124#[ stable( feature = "rust1" , since = "1.0.0" ) ]
124125unsafe impl Send for Once { }
125126
127+ #[ stable( feature = "sync_once_unwind_safe" , since = "1.59.0" ) ]
128+ impl UnwindSafe for Once { }
129+
130+ #[ stable( feature = "sync_once_unwind_safe" , since = "1.59.0" ) ]
131+ impl RefUnwindSafe for Once { }
132+
126133/// State yielded to [`Once::call_once_force()`]’s closure parameter. The state
127134/// can be used to query the poison status of the [`Once`].
128135#[ stable( feature = "once_poison" , since = "1.51.0" ) ]
You can’t perform that action at this time.
0 commit comments