Skip to content

Commit

Permalink
Rollup merge of rust-lang#125527 - programmerjake:patch-2, r=workingj…
Browse files Browse the repository at this point in the history
…ubilee

Add manual Sync impl for ReentrantLockGuard

Fixes: rust-lang#125526
Tracking Issue: rust-lang#121440

this impl is even shown in the summary in the tracking issue, but apparently was forgotten in the actual implementation
  • Loading branch information
matthiaskrgr authored May 25, 2024
2 parents d6812d5 + 5257f3f commit c11b36a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions std/src/sync/reentrant_lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ pub struct ReentrantLockGuard<'a, T: ?Sized + 'a> {
#[unstable(feature = "reentrant_lock", issue = "121440")]
impl<T: ?Sized> !Send for ReentrantLockGuard<'_, T> {}

#[unstable(feature = "reentrant_lock", issue = "121440")]
unsafe impl<T: ?Sized + Sync> Sync for ReentrantLockGuard<'_, T> {}

#[unstable(feature = "reentrant_lock", issue = "121440")]
impl<T> ReentrantLock<T> {
/// Creates a new re-entrant lock in an unlocked state ready for use.
Expand Down

0 comments on commit c11b36a

Please sign in to comment.