move once module out of poison#147125
Conversation
|
r? @ibraheemdev rustbot has assigned @ibraheemdev. Use |
|
r? @tgross35 |
|
|
There was a problem hiding this comment.
A few nits here then r=me
Additionally:
1. Renames `once::ExclusiveState` to `OnceExclusiveState` since it was a bit confusing reading just `ExclusiveState` where it is used. 2. Reorders a few module definitions and re-exports in `library/std/src/sync/mod.rs` for clarity.
For future reference, since these and the original Once change are all orthogonal, they'd ideally be split to three separate commits. It's a separation of concerns (cleanup vs. behavior change) and makes the diffs easier to follow.
| Condvar, | ||
| Once, OnceState, | ||
| RwLock, RwLockReadGuard, RwLockWriteGuard, | ||
| }; |
There was a problem hiding this comment.
Looks like alphabetical ordering may have gotten flipped between Mutex and TryLockError. (would be nice if we could just remove the rustfmt::skip from this module but it does make things messy)
There was a problem hiding this comment.
I actually did this purposefully (though Condvar should probably come after RwLock now that I think about it because RwLock relies on TryLockError too). Once I finish revisions let me know if the ordering makes sense (commit 7b61403)
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
It is a bit confusing when reading code that uses this type since it is not immediately obvious that it is specific to `Once`. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
ef16d45 to
dca5bc2
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Moves things around to make a bit more sense (plus prepare moving `once` out of `poison`. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Since `Once` will not have a non-poisoning variant, we remove it from the `poison` module. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
dca5bc2 to
3a9c521
Compare
|
@rustbot ready (Also sorry about the commit hygiene I think I was just being lazy) |
No worries, we don't have any commit guidelines so it's just nice to have rather than required :). Thanks for doing it now, though! @bors r+ rollup |
…=tgross35 move `once` module out of `poison` From rust-lang#134645 (comment), since `Once` will not have a non-poisoning variant, we remove it from the `poison` module. Additionally: 1. Renames `once::ExclusiveState` to `OnceExclusiveState` since it was a bit confusing reading just `ExclusiveState` where it is used. 2. Reorders a few module definitions and re-exports in `library/std/src/sync/mod.rs` for clarity. Also, once this is merged, I think that we can begin the process of stabilizing [`sync_poison_mod`](rust-lang#134646)
Rollup of 5 pull requests Successful merges: - #147125 (move `once` module out of `poison`) - #147800 (Add `Cacheable` trait alias in `rustc_public_bridge`) - #147860 (rustdoc search: relax rules for identifiers) - #147916 (Update books) - #147924 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #147125 - connortsui20:poison-once-remove, r=tgross35 move `once` module out of `poison` From #134645 (comment), since `Once` will not have a non-poisoning variant, we remove it from the `poison` module. Additionally: 1. Renames `once::ExclusiveState` to `OnceExclusiveState` since it was a bit confusing reading just `ExclusiveState` where it is used. 2. Reorders a few module definitions and re-exports in `library/std/src/sync/mod.rs` for clarity. Also, once this is merged, I think that we can begin the process of stabilizing [`sync_poison_mod`](#134646)
Rollup of 5 pull requests Successful merges: - rust-lang/rust#147125 (move `once` module out of `poison`) - rust-lang/rust#147800 (Add `Cacheable` trait alias in `rustc_public_bridge`) - rust-lang/rust#147860 (rustdoc search: relax rules for identifiers) - rust-lang/rust#147916 (Update books) - rust-lang/rust#147924 (rustc-dev-guide subtree update) r? `@ghost` `@rustbot` modify labels: rollup
…=tgross35 move `once` module out of `poison` From rust-lang#134645 (comment), since `Once` will not have a non-poisoning variant, we remove it from the `poison` module. Additionally: 1. Renames `once::ExclusiveState` to `OnceExclusiveState` since it was a bit confusing reading just `ExclusiveState` where it is used. 2. Reorders a few module definitions and re-exports in `library/std/src/sync/mod.rs` for clarity. Also, once this is merged, I think that we can begin the process of stabilizing [`sync_poison_mod`](rust-lang#134646)
From #134645 (comment), since
Oncewill not have a non-poisoning variant, we remove it from thepoisonmodule.Additionally:
once::ExclusiveStatetoOnceExclusiveStatesince it was a bit confusing reading justExclusiveStatewhere it is used.library/std/src/sync/mod.rsfor clarity.Also, once this is merged, I think that we can begin the process of stabilizing
sync_poison_modandsync_nonpoison