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/rwlock/write_guard.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/rwlock/write_guard.rs') diff --git a/src/rwlock/write_guard.rs b/src/rwlock/write_guard.rs index 09fb898..0121140 100644 --- a/src/rwlock/write_guard.rs +++ b/src/rwlock/write_guard.rs @@ -59,14 +59,13 @@ impl<'a, 'key: 'a, T: ?Sized + 'a, Key: Keyable, R: RawRwLock> /// Create a guard to the given mutex. Undefined if multiple guards to the /// same mutex exist at once. #[must_use] - pub(super) const unsafe fn new(rwlock: &'a RwLock, thread_key: Key) -> Self { + pub(super) unsafe fn new(rwlock: &'a RwLock, thread_key: Key) -> Self { Self { - rwlock: RwLockWriteRef(rwlock), + rwlock: RwLockWriteRef(rwlock, PhantomData), thread_key, _phantom1: PhantomData, - _phantom2: PhantomData, } } } -unsafe impl<'a, T: ?Sized + 'a, R: RawRwLock + Sync + 'a> Sync for RwLockWriteRef<'a, T, R> {} +unsafe impl<'a, T: ?Sized + Sync + 'a, R: RawRwLock + Sync + 'a> Sync for RwLockWriteRef<'a, T, R> {} -- cgit v1.2.3