rust: debugfs: Implement BinaryReader for Mutex<T> only when T is Unpin
Commit da123f0ee4 ("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>
This commit is contained in:
@@ -257,7 +257,7 @@ pub trait BinaryReader {
|
||||
}
|
||||
|
||||
// Delegate for `Mutex<T>`: Support a `T` with an outer `Mutex`.
|
||||
impl<T: BinaryReaderMut> BinaryReader for Mutex<T> {
|
||||
impl<T: BinaryReaderMut + Unpin> BinaryReader for Mutex<T> {
|
||||
fn read_from_slice(
|
||||
&self,
|
||||
reader: &mut UserSliceReader,
|
||||
|
||||
Reference in New Issue
Block a user