Skip to content

Commit 40dbfbf

Browse files
Add manual Sync impl for ReentrantLockGuard
Fixes: #125526
1 parent 36153f1 commit 40dbfbf

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/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)