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

Simplify Mutex::into_inner #84650

Merged
merged 1 commit into from
Apr 28, 2021
Merged

Conversation

a1phyr
Copy link
Contributor

@a1phyr a1phyr commented Apr 28, 2021

Thanks to #77147, Mutex do not implement Drop directly, so the old unsafe implementation of into_inner is not relevant anymore.

@rust-highfive
Copy link
Collaborator

r? @m-ou-se

(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 Apr 28, 2021
@m-ou-se
Copy link
Member

m-ou-se commented Apr 28, 2021

Nice!

@bors r+

@bors
Copy link
Contributor

bors commented Apr 28, 2021

📌 Commit 0b7b121 has been approved by m-ou-se

@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 Apr 28, 2021
@bors
Copy link
Contributor

bors commented Apr 28, 2021

⌛ Testing commit 0b7b121 with merge da43ee8...

@bors
Copy link
Contributor

bors commented Apr 28, 2021

☀️ Test successful - checks-actions
Approved by: m-ou-se
Pushing da43ee8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 28, 2021
@bors bors merged commit da43ee8 into rust-lang:master Apr 28, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 28, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Jun 10, 2021
Multiple improvements to RwLocks

This PR replicates rust-lang#77147, rust-lang#77380 and rust-lang#84650 on RWLocks :
- Split `sys_common::RWLock` in `StaticRWLock` and `MovableRWLock`
- Unbox rwlocks on some platforms (Windows, Wasm and unsupported)
- Simplify `RwLock::into_inner`

Notes to reviewers :
- For each target, I copied `MovableMutex` to guess if `MovableRWLock` should be boxed.
- ~A comment says that `StaticMutex` is not re-entrant, I don't understand why and I don't know whether it applies to `StaticRWLock`.~

r? `@m-ou-se`
@a1phyr a1phyr deleted the simplify_mutex_into_inner branch March 12, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants