diff options
| author | Mica White <botahamec@outlook.com> | 2024-03-11 22:41:13 -0400 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2024-03-11 22:41:13 -0400 |
| commit | a22ffadbebddcbec9bb127b295f8a8516174e6e6 (patch) | |
| tree | 66925b072f43646aafb40834e293c11b98f08c87 /src/mutex.rs | |
| parent | ef34f899313ed4e4c5e452aef2c670f7d51f1ca9 (diff) | |
More trait bound fixes
Diffstat (limited to 'src/mutex.rs')
| -rw-r--r-- | src/mutex.rs | 5 |
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. |
