Implementation: #[feature(sync_nonpoison)], #[feature(nonpoison_mutex)]#144022
Merged
bors merged 5 commits intorust-lang:masterfrom Jul 29, 2025
Merged
Implementation: #[feature(sync_nonpoison)], #[feature(nonpoison_mutex)]#144022bors merged 5 commits intorust-lang:masterfrom
#[feature(sync_nonpoison)], #[feature(nonpoison_mutex)]#144022bors merged 5 commits intorust-lang:masterfrom
Conversation
b45b493 to
deda5c5
Compare
This comment has been minimized.
This comment has been minimized.
deda5c5 to
19b1a2c
Compare
This comment has been minimized.
This comment has been minimized.
19b1a2c to
a259232
Compare
This comment has been minimized.
This comment has been minimized.
e130930 to
804d305
Compare
connortsui20
commented
Jul 18, 2025
connortsui20
commented
Jul 18, 2025
804d305 to
b615348
Compare
Collaborator
Contributor
|
r? tgross35 |
5 tasks
35fc4df to
71395b1
Compare
tgross35
requested changes
Jul 23, 2025
Contributor
tgross35
left a comment
There was a problem hiding this comment.
Looks pretty good to me, most comments here are related to docs. This will need some history cleanup, there isn't any need to preserve the current state of #134663 in history (I assume this was just done for now to show what changed since then)
Collaborator
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Jul 29, 2025
…oss35 Implementation: `#[feature(sync_nonpoison)]`, `#[feature(nonpoison_mutex)]` Continuation of rust-lang#134663 Tracking Issue: rust-lang#134645 This PR implements a new `sync/nonpoison` module, as well as the `nonpoison` variant of the `Mutex` lock. There are 2 main changes here, the first is the new `nonpoison::mutex` module, and the second is the `mutex` integration tests. For the `nonpoison::mutex` module, I did my best to align it with the current state of the `poison::mutex` module. This means that several unstable features (`mapped_lock_guards`, `lock_value_accessors`, and `mutex_data_ptr`) are also in the new `nonpoison::mutex` module, under their respective feature gates. Everything else in that file is under the correct feature gate (`#[unstable(feature = "nonpoison_mutex", issue = "134645")]`). Everything in the `nonpoison::mutex` file is essentially identical in spirit, as we are simply removing the error case from the original `poison::mutex`. The second big change is in the integration tests. I created a macro called that allows us to duplicate tests that are "generic" over the different mutex types, in that the poison mutex is always `unwrap`ped. ~~I think that there is an argument against doing this, as it can make the tests a bit harder to understand (and language server capabilities are weaker within macros), but I think the benefit of code deduplication here is worth it. Note that it is definitely possible to generalize this (with a few tweaks) to testing the other `nonpoison` locks when they eventually get implemented, but I'll leave that for a later discussion.~~
bors
added a commit
that referenced
this pull request
Jul 29, 2025
Rollup of 14 pull requests Successful merges: - #144022 (Implementation: `#[feature(sync_nonpoison)]`, `#[feature(nonpoison_mutex)]`) - #144167 (Document why `Range*<&T> as RangeBounds<T>` impls are not `T: ?Sized`, and give an alternative.) - #144407 (fix(debuginfo): disable overflow check for recursive non-enum types) - #144451 (fix: Reject upvar scrutinees for `loop_match`) - #144482 (Add explicit download methods to download module in bootstrap) - #144500 (thread name in stack overflow message) - #144511 (tidy: increase performance of auto extra checks feature) - #144586 (Update wasi-sdk to 27.0 in CI) - #144599 (bootstrap: enable tidy auto extra checks on tools profile) - #144600 (Ensure external paths passed via flags end up in rustdoc depinfo) - #144609 (feat: Right align line numbers) - #144623 (miri subtree update) - #144626 (cc dependencies: clarify comment) - #144627 (Add a test case for the issue #129882) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
that referenced
this pull request
Jul 29, 2025
Rollup of 13 pull requests Successful merges: - #144022 (Implementation: `#[feature(sync_nonpoison)]`, `#[feature(nonpoison_mutex)]`) - #144167 (Document why `Range*<&T> as RangeBounds<T>` impls are not `T: ?Sized`, and give an alternative.) - #144407 (fix(debuginfo): disable overflow check for recursive non-enum types) - #144451 (fix: Reject upvar scrutinees for `loop_match`) - #144482 (Add explicit download methods to download module in bootstrap) - #144500 (thread name in stack overflow message) - #144511 (tidy: increase performance of auto extra checks feature) - #144599 (bootstrap: enable tidy auto extra checks on tools profile) - #144600 (Ensure external paths passed via flags end up in rustdoc depinfo) - #144609 (feat: Right align line numbers) - #144623 (miri subtree update) - #144626 (cc dependencies: clarify comment) - #144627 (Add a test case for the issue #129882) r? `@ghost` `@rustbot` modify labels: rollup
Collaborator
rust-timer
added a commit
that referenced
this pull request
Jul 29, 2025
Rollup merge of #144022 - connortsui20:sync_nonpoison, r=tgross35 Implementation: `#[feature(sync_nonpoison)]`, `#[feature(nonpoison_mutex)]` Continuation of #134663 Tracking Issue: #134645 This PR implements a new `sync/nonpoison` module, as well as the `nonpoison` variant of the `Mutex` lock. There are 2 main changes here, the first is the new `nonpoison::mutex` module, and the second is the `mutex` integration tests. For the `nonpoison::mutex` module, I did my best to align it with the current state of the `poison::mutex` module. This means that several unstable features (`mapped_lock_guards`, `lock_value_accessors`, and `mutex_data_ptr`) are also in the new `nonpoison::mutex` module, under their respective feature gates. Everything else in that file is under the correct feature gate (`#[unstable(feature = "nonpoison_mutex", issue = "134645")]`). Everything in the `nonpoison::mutex` file is essentially identical in spirit, as we are simply removing the error case from the original `poison::mutex`. The second big change is in the integration tests. I created a macro called that allows us to duplicate tests that are "generic" over the different mutex types, in that the poison mutex is always `unwrap`ped. ~~I think that there is an argument against doing this, as it can make the tests a bit harder to understand (and language server capabilities are weaker within macros), but I think the benefit of code deduplication here is worth it. Note that it is definitely possible to generalize this (with a few tweaks) to testing the other `nonpoison` locks when they eventually get implemented, but I'll leave that for a later discussion.~~
Contributor
|
@bors r- ^ For whatever that is, it's already tested and merged |
This was referenced Jul 29, 2025
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this pull request
Jul 30, 2025
…oss35 Implementation: `#[feature(sync_nonpoison)]`, `#[feature(nonpoison_mutex)]` Continuation of rust-lang#134663 Tracking Issue: rust-lang#134645 This PR implements a new `sync/nonpoison` module, as well as the `nonpoison` variant of the `Mutex` lock. There are 2 main changes here, the first is the new `nonpoison::mutex` module, and the second is the `mutex` integration tests. For the `nonpoison::mutex` module, I did my best to align it with the current state of the `poison::mutex` module. This means that several unstable features (`mapped_lock_guards`, `lock_value_accessors`, and `mutex_data_ptr`) are also in the new `nonpoison::mutex` module, under their respective feature gates. Everything else in that file is under the correct feature gate (`#[unstable(feature = "nonpoison_mutex", issue = "134645")]`). Everything in the `nonpoison::mutex` file is essentially identical in spirit, as we are simply removing the error case from the original `poison::mutex`. The second big change is in the integration tests. I created a macro called that allows us to duplicate tests that are "generic" over the different mutex types, in that the poison mutex is always `unwrap`ped. ~~I think that there is an argument against doing this, as it can make the tests a bit harder to understand (and language server capabilities are weaker within macros), but I think the benefit of code deduplication here is worth it. Note that it is definitely possible to generalize this (with a few tweaks) to testing the other `nonpoison` locks when they eventually get implemented, but I'll leave that for a later discussion.~~
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Aug 1, 2025
Rollup of 13 pull requests Successful merges: - rust-lang/rust#144022 (Implementation: `#[feature(sync_nonpoison)]`, `#[feature(nonpoison_mutex)]`) - rust-lang/rust#144167 (Document why `Range*<&T> as RangeBounds<T>` impls are not `T: ?Sized`, and give an alternative.) - rust-lang/rust#144407 (fix(debuginfo): disable overflow check for recursive non-enum types) - rust-lang/rust#144451 (fix: Reject upvar scrutinees for `loop_match`) - rust-lang/rust#144482 (Add explicit download methods to download module in bootstrap) - rust-lang/rust#144500 (thread name in stack overflow message) - rust-lang/rust#144511 (tidy: increase performance of auto extra checks feature) - rust-lang/rust#144599 (bootstrap: enable tidy auto extra checks on tools profile) - rust-lang/rust#144600 (Ensure external paths passed via flags end up in rustdoc depinfo) - rust-lang/rust#144609 (feat: Right align line numbers) - rust-lang/rust#144623 (miri subtree update) - rust-lang/rust#144626 (cc dependencies: clarify comment) - rust-lang/rust#144627 (Add a test case for the issue rust-lang/rust#129882) r? `@ghost` `@rustbot` modify labels: rollup
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 22, 2025
…ark-Simulacrum Implementation: `#[feature(nonpoison_rwlock)]` Tracking Issue: rust-lang#134645 This PR continues the effort made in rust-lang#144022 by adding the implementation of `nonpoison::rwlock`. Many of the changes here are similar to the changes made to implement `nonpoison::mutex`. The only real difference is that this PR includes a reorganizing of the existing `poison::rwlock` file that hopefully makes both variants more readable. ### Related PRs - `nonpoison_condvar` implementation: rust-lang#144651 - `nonpoison_once` implementation: rust-lang#144653
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 23, 2025
…ark-Simulacrum Implementation: `#[feature(nonpoison_rwlock)]` Tracking Issue: rust-lang#134645 This PR continues the effort made in rust-lang#144022 by adding the implementation of `nonpoison::rwlock`. Many of the changes here are similar to the changes made to implement `nonpoison::mutex`. The only real difference is that this PR includes a reorganizing of the existing `poison::rwlock` file that hopefully makes both variants more readable. ### Related PRs - `nonpoison_condvar` implementation: rust-lang#144651 - `nonpoison_once` implementation: rust-lang#144653
rust-timer
added a commit
that referenced
this pull request
Aug 23, 2025
Rollup merge of #144648 - connortsui20:nonpoison_rwlock, r=Mark-Simulacrum Implementation: `#[feature(nonpoison_rwlock)]` Tracking Issue: #134645 This PR continues the effort made in #144022 by adding the implementation of `nonpoison::rwlock`. Many of the changes here are similar to the changes made to implement `nonpoison::mutex`. The only real difference is that this PR includes a reorganizing of the existing `poison::rwlock` file that hopefully makes both variants more readable. ### Related PRs - `nonpoison_condvar` implementation: #144651 - `nonpoison_once` implementation: #144653
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Aug 24, 2025
…acrum Implementation: `#[feature(nonpoison_rwlock)]` Tracking Issue: rust-lang/rust#134645 This PR continues the effort made in rust-lang/rust#144022 by adding the implementation of `nonpoison::rwlock`. Many of the changes here are similar to the changes made to implement `nonpoison::mutex`. The only real difference is that this PR includes a reorganizing of the existing `poison::rwlock` file that hopefully makes both variants more readable. ### Related PRs - `nonpoison_condvar` implementation: rust-lang/rust#144651 - `nonpoison_once` implementation: rust-lang/rust#144653
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Aug 25, 2025
…acrum Implementation: `#[feature(nonpoison_rwlock)]` Tracking Issue: rust-lang/rust#134645 This PR continues the effort made in rust-lang/rust#144022 by adding the implementation of `nonpoison::rwlock`. Many of the changes here are similar to the changes made to implement `nonpoison::mutex`. The only real difference is that this PR includes a reorganizing of the existing `poison::rwlock` file that hopefully makes both variants more readable. ### Related PRs - `nonpoison_condvar` implementation: rust-lang/rust#144651 - `nonpoison_once` implementation: rust-lang/rust#144653
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this pull request
Aug 26, 2025
…ark-Simulacrum Implementation: `#[feature(nonpoison_rwlock)]` Tracking Issue: rust-lang#134645 This PR continues the effort made in rust-lang#144022 by adding the implementation of `nonpoison::rwlock`. Many of the changes here are similar to the changes made to implement `nonpoison::mutex`. The only real difference is that this PR includes a reorganizing of the existing `poison::rwlock` file that hopefully makes both variants more readable. ### Related PRs - `nonpoison_condvar` implementation: rust-lang#144651 - `nonpoison_once` implementation: rust-lang#144653
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Aug 30, 2025
…joboet Implementation: `#[feature(nonpoison_condvar)]` Tracking Issue: rust-lang#134645 This PR continues the effort made in rust-lang#144022 by adding the implementation of `nonpoison::condvar`. Many of the changes here are similar to the changes made to implement `nonpoison::mutex`. There are two other changes here. The first is that the `Barrier` implementation is migrated to use the `nonpoison::Condvar` instead of the `poison` variant. The second (which might be subject to some discussion) is that `WaitTimeoutResult` is moved up to `mod.rs`, as both `condvar` variants need that type (and I do not know if there is a better place to put it now). ### Related PRs - `nonpoison_rwlock` implementation: rust-lang#144648 - `nonpoison_once` implementation: rust-lang#144653
rust-timer
added a commit
that referenced
this pull request
Aug 30, 2025
Rollup merge of #144651 - connortsui20:nonpoison_condvar, r=joboet Implementation: `#[feature(nonpoison_condvar)]` Tracking Issue: #134645 This PR continues the effort made in #144022 by adding the implementation of `nonpoison::condvar`. Many of the changes here are similar to the changes made to implement `nonpoison::mutex`. There are two other changes here. The first is that the `Barrier` implementation is migrated to use the `nonpoison::Condvar` instead of the `poison` variant. The second (which might be subject to some discussion) is that `WaitTimeoutResult` is moved up to `mod.rs`, as both `condvar` variants need that type (and I do not know if there is a better place to put it now). ### Related PRs - `nonpoison_rwlock` implementation: #144648 - `nonpoison_once` implementation: #144653
github-actions bot
pushed a commit
to model-checking/verify-rust-std
that referenced
this pull request
Sep 9, 2025
…joboet Implementation: `#[feature(nonpoison_condvar)]` Tracking Issue: rust-lang#134645 This PR continues the effort made in rust-lang#144022 by adding the implementation of `nonpoison::condvar`. Many of the changes here are similar to the changes made to implement `nonpoison::mutex`. There are two other changes here. The first is that the `Barrier` implementation is migrated to use the `nonpoison::Condvar` instead of the `poison` variant. The second (which might be subject to some discussion) is that `WaitTimeoutResult` is moved up to `mod.rs`, as both `condvar` variants need that type (and I do not know if there is a better place to put it now). ### Related PRs - `nonpoison_rwlock` implementation: rust-lang#144648 - `nonpoison_once` implementation: rust-lang#144653
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continuation of #134663
Tracking Issue: #134645
This PR implements a new
sync/nonpoisonmodule, as well as thenonpoisonvariant of theMutexlock.There are 2 main changes here, the first is the new
nonpoison::mutexmodule, and the second is themutexintegration tests.For the
nonpoison::mutexmodule, I did my best to align it with the current state of thepoison::mutexmodule. This means that several unstable features (mapped_lock_guards,lock_value_accessors, andmutex_data_ptr) are also in the newnonpoison::mutexmodule, under their respective feature gates. Everything else in that file is under the correct feature gate (#[unstable(feature = "nonpoison_mutex", issue = "134645")]).Everything in the
nonpoison::mutexfile is essentially identical in spirit, as we are simply removing the error case from the originalpoison::mutex.The second big change is in the integration tests. I created a macro called that allows us to duplicate tests that are "generic" over the different mutex types, in that the poison mutex is always
unwrapped.I think that there is an argument against doing this, as it can make the tests a bit harder to understand (and language server capabilities are weaker within macros), but I think the benefit of code deduplication here is worth it. Note that it is definitely possible to generalize this (with a few tweaks) to testing the othernonpoisonlocks when they eventually get implemented, but I'll leave that for a later discussion.