Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5257f3f

Browse files
committedMay 25, 2024
Add manual Sync impl for ReentrantLockGuard
Fixes: rust-lang#125526
1 parent 567096d commit 5257f3f

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)
Failed to load comments.