summaryrefslogtreecommitdiff
path: root/src/mutex.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mutex.rs')
-rw-r--r--src/mutex.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mutex.rs b/src/mutex.rs
index ed8d4a4..59e55a9 100644
--- a/src/mutex.rs
+++ b/src/mutex.rs
@@ -37,7 +37,10 @@ pub struct Mutex<T: ?Sized, R> {
}
/// A reference to a mutex that unlocks it when dropped
-pub struct MutexRef<'a, T: ?Sized + 'a, R: RawMutex>(&'a Mutex<T, R>);
+pub struct MutexRef<'a, T: ?Sized + 'a, R: RawMutex>(
+ &'a Mutex<T, R>,
+ PhantomData<(&'a mut T, R::GuardMarker)>,
+);
/// An RAII implementation of a “scoped lock” of a mutex. When this structure
/// is dropped (falls out of scope), the lock will be unlocked.