Skip to content

Commit c11b36a

Browse files
authored
Rollup merge of rust-lang#125527 - programmerjake:patch-2, r=workingjubilee
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
2 parents d6812d5 + 5257f3f commit c11b36a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

std/src/sync/reentrant_lock.rs

+3
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ pub struct ReentrantLockGuard<'a, T: ?Sized + 'a> {
116116
#[unstable(feature = "reentrant_lock", issue = "121440")]
117117
impl<T: ?Sized> !Send for ReentrantLockGuard<'_, T> {}
118118

119+
#[unstable(feature = "reentrant_lock", issue = "121440")]
120+
unsafe impl<T: ?Sized + Sync> Sync for ReentrantLockGuard<'_, T> {}
121+
119122
#[unstable(feature = "reentrant_lock", issue = "121440")]
120123
impl<T> ReentrantLock<T> {
121124
/// Creates a new re-entrant lock in an unlocked state ready for use.

0 commit comments

Comments
 (0)