Open y86-dev opened 2 months ago
The impl_has_work macro only supports idents as generic arguments:
impl_has_work
ident
macro_rules! impl_has_work { ($(impl$(<$($implarg:ident),*>)? HasWork<$work_type:ty $(, $id:tt)?> for $self:ident $(<$($selfarg:ident),*>)? { self.$field:ident } )*) => {$(
There is a workaround, see Alice's linked list patch:
macro_rules! impl_list_item { ( impl$({$($generics:tt)*})? ListItem<$num:tt> for $t:ty { using ListLinks; } $($rest:tt)* ) => {
Make the impl_has_work macro compatible with more complex generics such as lifetimes and const generic arguments.
This requires submitting a proper patch to the LKML and the Rust for Linux mailing list. Please recall to test your changes, to use a proper title for the commit, to sign your commit under the Developer's Certificate of Origin and so on. Please see https://docs.kernel.org/process/submitting-patches.html and https://rust-for-linux.com/contributing for details.
Please take this issue only if you are new to the kernel development process and you would like to use it as a test to submit your first patch to the kernel. Please do not take it if you do not plan to make other contributions to the kernel.
I'd like to try this, and I sent an email, https://lore.kernel.org/rust-for-linux/ME0P282MB4890167E8316FECBA35D7533CCEB2@ME0P282MB4890.AUSP282.PROD.OUTLOOK.COM/T/#t. I don't know if I did the right thing
The
impl_has_work
macro only supportsident
s as generic arguments:There is a workaround, see Alice's linked list patch:
Make the
impl_has_work
macro compatible with more complex generics such as lifetimes and const generic arguments.This requires submitting a proper patch to the LKML and the Rust for Linux mailing list. Please recall to test your changes, to use a proper title for the commit, to sign your commit under the Developer's Certificate of Origin and so on. Please see https://docs.kernel.org/process/submitting-patches.html and https://rust-for-linux.com/contributing for details.
Please take this issue only if you are new to the kernel development process and you would like to use it as a test to submit your first patch to the kernel. Please do not take it if you do not plan to make other contributions to the kernel.