Skip to content
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

Fix Debug implementation for RwLock{Read,Write}Guard. #83559

Merged
merged 1 commit into from
Mar 27, 2021

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Mar 27, 2021

This would attempt to print the Debug representation of the lock that the guard has locked, which will try to lock again, fail, and just print "<locked>" unhelpfully.

After this change, this just prints the contents of the mutex, like the other smart pointers (and MutexGuard) do.

MutexGuard had this problem too: #57702

This would attempt to print the Debug representation of the lock that
the guard has locked, which will try to lock again, fail, and just print
"<locked>" unhelpfully.

After this change, this just prints the contents of the mutex, like the
other smart pointers (and MutexGuard) do.
@m-ou-se m-ou-se added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label Mar 27, 2021
@rust-highfive
Copy link
Collaborator

r? @joshtriplett

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 27, 2021
@jackh726
Copy link
Member

r? @jackh726

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Mar 27, 2021

📌 Commit d730153 has been approved by jackh726

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 27, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 27, 2021
Rollup of 10 pull requests

Successful merges:

 - rust-lang#79399 (Use detailed and shorter fs error explaination)
 - rust-lang#83348 (format macro argument parsing fix)
 - rust-lang#83462 (ExitStatus: print "exit status: {}" rather than "exit code: {}" on unix)
 - rust-lang#83526 (lazily calls some fns)
 - rust-lang#83558 (Use DebugStruct::finish_non_exhaustive() in std.)
 - rust-lang#83559 (Fix Debug implementation for RwLock{Read,Write}Guard.)
 - rust-lang#83560 (Derive Debug for io::Chain instead of manually implementing it.)
 - rust-lang#83561 (Improve Debug implementations of Mutex and RwLock.)
 - rust-lang#83567 (Update rustup cross-compilation docs link)
 - rust-lang#83569 (Add regression tests for rust-lang#56445)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5dc29e1 into rust-lang:master Mar 27, 2021
@rustbot rustbot added this to the 1.53.0 milestone Mar 27, 2021
@m-ou-se m-ou-se deleted the rwlock-guard-debug-fix branch March 28, 2021 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants