-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark OnceState::poison
as pub
#133240
base: master
Are you sure you want to change the base?
Mark OnceState::poison
as pub
#133240
Conversation
library/std/src/sync/once.rs
Outdated
/// | ||
/// Poison a [`Once`] by explicitly calling [`OnceState::poison`]: | ||
/// | ||
/// ``` | ||
/// #![feature(once_poison_pub)] | ||
/// | ||
/// use std::sync::Once; | ||
/// | ||
/// static INIT: Once = Once::new(); | ||
/// | ||
/// // poison the once without panicking | ||
/// INIT.call_once_force(|p| p.poison()); | ||
/// INIT.call_once_force(|p| assert!(p.is_poisoned())); | ||
/// ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These docs look a bit off, maybe from the rebase? This example would be better in the docs for poison
, and the heading "Poison a [Once
] by panicking in a call_once
closure:" is added twice (once here, once above the existing example).
It looks like this hasn't had an ACP or libs-api approval yet r? libs-api |
This comment has been minimized.
This comment has been minimized.
c6e96c7
to
967fb97
Compare
@GrigorenkoPV it is probably easiest to move this forward if you file an ACP at https://github.com/rust-lang/libs-team/issues, could you do that? |
Done: @rustbot label +S-waiting-on-ACP |
☔ The latest upstream changes (presumably #134692) made this pull request unmergeable. Please resolve the merge conflicts. |
967fb97
to
4f6e873
Compare
Rebase of #130330 with #130330 (comment) fixed
Tracking issue: #130327