From a22ffadbebddcbec9bb127b295f8a8516174e6e6 Mon Sep 17 00:00:00 2001 From: Mica White Date: Mon, 11 Mar 2024 22:41:13 -0400 Subject: More trait bound fixes --- src/mutex.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mutex.rs') 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 { } /// A reference to a mutex that unlocks it when dropped -pub struct MutexRef<'a, T: ?Sized + 'a, R: RawMutex>(&'a Mutex); +pub struct MutexRef<'a, T: ?Sized + 'a, R: RawMutex>( + &'a Mutex, + 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. -- cgit v1.2.3