Skip to content

std: make nonpoison::RwLockReadGuard invariant - #164197

Open
joboet wants to merge 1 commit into
rust-lang:mainfrom
joboet:invariant-readguard
Open

joboet wants to merge 1 commit into
rust-lang:mainfrom
joboet:invariant-readguard

Conversation

@joboet

@joboet joboet commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Tracking issue: #134645

RwLockReadGuard needs to be invariant over T to make read-guard-upgrading sound. In the unlikely case that users need covariance (because they pass the guard around instead of references to the data), they can use MappedRwLockReadGuard, which remains covariant.

@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 Oct 12, 2026
@rustbot

rustbot commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from JohnTitor, Mark-Simulacrum

@joboet

joboet commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

@rustbot label I-libs-nominated

@rustbot rustbot added the I-libs-nominated Nominated for discussion during a libs team meeting. label Oct 12, 2026
@rust-bors

rust-bors Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #164230) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

I-libs-nominated Nominated for discussion during a libs team meeting. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants