rust: debugfs: Implement BinaryReader for Mutex<T> only when T is Unpin
Subsystems (2)
Danilo Krummrich
maintainerPATCH 1/1 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 <[email protected]>
Signed-off-by Danilo Krummrich <[email protected]>
--- rust/kernel/debugfs/traits.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/debugfs/traits.rs +1 -1
@@ -257,7 +257,7 @@ fn read_from_slice( }// 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,
Signature · 1 line
2.51.0
Quoted 8 lines · Danilo Krummrich
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 <[email protected]>Signed-off-by Danilo Krummrich <[email protected]>
Reviewed-by Alice Ryhl <[email protected]>
Quoted 8 lines · Danilo Krummrich
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 <[email protected]>Signed-off-by Danilo Krummrich <[email protected]>
Applied to driver-core-next, thanks!