Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Reoganize poison::rwlock file #144175

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

Closed
connortsui20 wants to merge 2 commits into rust-lang:master from connortsui20:rwlock-cleanup

Conversation

Copy link
Contributor

@connortsui20 connortsui20 commented Jul 19, 2025
edited
Loading

This PR is a purely cosmetic change to the documentation and ordering of items in the rwlock.rs file.

This is mainly in preparation for the eventual implementation of #![feature(nonpoison_rwlock)] (which I am planning to do soon), and the issue for that can be found in #134645. These changes should make it easier to find things in the code and port things over to a future nonpoison variant of RwLock.

List of changes (lots of small things):

  • Clean up some of the existing field doc comments
  • Add documentation for every field in struct definitions
  • Consolidate related implementation blocks (1 implementation block per guard instead of 2)
  • Use the lifetime name 'rwlock instead of 'a
  • Reorder implementation blocks to be consistent across the entire file (follows the order ReadGuard, WriteGuard, MappedReadGuard, MappedWriteGuard)
  • Move simple trait implementations to the bottom of the file
  • Rename the poison field in MappedRwLockWriteGuard to posion_guard
  • Cut off comments at 100 columns
  • Update the documentation of downgrade to match Stabilize rwlock_downgrade library feature #143191

Edit: some more cosmetic changes to the rwlock test file, and it is simply moving tests up or down depending on if they test poisoning or not. This will again make the implementation of nonpoison_rwlock much easier.

Copy link
Collaborator

rustbot commented Jul 19, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 19, 2025
@connortsui20 connortsui20 changed the title (削除) Reoganize rwlock file (削除ここまで) (追記) Reoganize poison::rwlock file (追記ここまで) Jul 19, 2025
This commit reorganizes the `rwlock` tests, moving the tests that
involve poisoning away from the ones that do not.
Copy link
Contributor Author

Closing this in favor of integrating this directly into the PR that implements #[feature(nonpoison_rwlock)] (coming soon)

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 29, 2025
@connortsui20 connortsui20 deleted the rwlock-cleanup branch July 29, 2025 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Labels
T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /