Skip to content

Commit c819da3

Browse files
committed
Revert "rust: lock: guard: Add T: Unpin bound to DerefMut"
This reverts commit da123f0.
1 parent 05f7e89 commit c819da3

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

rust/kernel/sync/lock.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,7 @@ impl<T: ?Sized, B: Backend> core::ops::Deref for Guard<'_, T, B> {
281281
}
282282
}
283283

284-
impl<T: ?Sized, B: Backend> core::ops::DerefMut for Guard<'_, T, B>
285-
where
286-
T: Unpin,
287-
{
284+
impl<T: ?Sized, B: Backend> core::ops::DerefMut for Guard<'_, T, B> {
288285
fn deref_mut(&mut self) -> &mut Self::Target {
289286
// SAFETY: The caller owns the lock, so it is safe to deref the protected data.
290287
unsafe { &mut *self.lock.data.get() }

rust/kernel/sync/lock/global.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,7 @@ impl<B: GlobalLockBackend> core::ops::Deref for GlobalGuard<B> {
106106
}
107107
}
108108

109-
impl<B: GlobalLockBackend> core::ops::DerefMut for GlobalGuard<B>
110-
where
111-
B::Item: Unpin,
112-
{
109+
impl<B: GlobalLockBackend> core::ops::DerefMut for GlobalGuard<B> {
113110
fn deref_mut(&mut self) -> &mut Self::Target {
114111
&mut self.inner
115112
}

0 commit comments

Comments
 (0)