linux-next: build failure after merge of the rust tree
Hi all,
After merging the rust tree and the other rust trees, today's linux-next build (x86_64 allmodconfig) failed like this:
error[E0599]: no method named cast_mut found for raw pointer *mut auxiliary_device in the current scope
--> rust/kernel/auxiliary.rs:239:83
|
239 | let adev = unsafe { container_of!(dev, bindings::auxiliary_device, dev) }.cast_mut();
| ^^^^^^^^
|
help: there is a method `as_mut` with a similar name
|
239 | let adev = unsafe { container_of!(dev, bindings::auxiliary_device, dev) }.as_mut();
| ~~~~~~error: aborting due to 1 previous error
For more information about this error, try rustc --explain E0599.
Not sure what caused this and that file has not changed from next-20250509, so I have used the rust tree from next-20250509 for today. Clearly I need help with the merge resolution here.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 4 lines · Stephen Rothwell
Not sure what caused this and that file has not changed from next-20250509, so I have used the rust tree from next-20250509 for today. Clearly I need help with the merge resolution here.
Sorry, it is due to commit b0ba6be4458e ("rust: retain pointer mut-ness in container_of!") -- the change requires cleanups in other code arriving elsewhere and auxiliary.rs does not have those.
I was about to suggest the cleanup (just removing 3 cases of .cast_mut()), but then I noticed a Clippy lint triggering in turn due to that -- reported.
Anyway, I have some upcoming travel, so I have dropped the commit (and the dependent) for the moment.
Thanks!
Cheers,
Miguel