Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: debugfs: Implement BinaryReader for Mutex<T> only when T is Unpin

Commit da123f0ee40f ("rust: lock: guard: Add T: Unpin bound to
DerefMut") from tip/master adds an Unpin bound to T for Mutex<T>, hence
also restrict the implementation of BinaryReader for Mutex<T>
accordingly.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20251107134144.117905bd@canb.auug.org.au/
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20251107091612.2557480-1-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>

+1 -1
+1 -1
rust/kernel/debugfs/traits.rs
··· 257 257 } 258 258 259 259 // Delegate for `Mutex<T>`: Support a `T` with an outer `Mutex`. 260 - impl<T: BinaryReaderMut> BinaryReader for Mutex<T> { 260 + impl<T: BinaryReaderMut + Unpin> BinaryReader for Mutex<T> { 261 261 fn read_from_slice( 262 262 &self, 263 263 reader: &mut UserSliceReader,