diff options
| author | bors <bors@rust-lang.org> | 2021-12-23 19:43:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-23 19:43:04 +0000 |
| commit | c09a9529c51cde41c1101e56049d418edb07bf71 (patch) | |
| tree | 0ccbb239ed96ad77fa9487d16b5931ee788213db /library/std/src | |
| parent | 77497c74f9268ccf91d7b4c17f23bf07117d7433 (diff) | |
| parent | 996fb28298157ebccdff0cb2718289de3d775ad3 (diff) | |
| download | rust-c09a9529c51cde41c1101e56049d418edb07bf71.tar.gz rust-c09a9529c51cde41c1101e56049d418edb07bf71.zip | |
Auto merge of #92232 - matthiaskrgr:rollup-eqdac7z, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #90625 (Add `UnwindSafe` to `Once`) - #92121 (disable test with self-referential generator on Miri) - #92166 (Fixed a small typo in ui test comments) - #92203 (Store a `DefId` instead of an `AdtDef` in `AggregateKind::Adt`) - #92231 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/sync/once.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/library/std/src/sync/once.rs b/library/std/src/sync/once.rs index 1710c005393..f76d0759561 100644 --- a/library/std/src/sync/once.rs +++ b/library/std/src/sync/once.rs @@ -90,6 +90,7 @@ mod tests; use crate::cell::Cell; use crate::fmt; use crate::marker; +use crate::panic::{RefUnwindSafe, UnwindSafe}; use crate::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; use crate::thread::{self, Thread}; @@ -123,6 +124,12 @@ unsafe impl Sync for Once {} #[stable(feature = "rust1", since = "1.0.0")] unsafe impl Send for Once {} +#[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")] |
