Re: [PATCH v3 05/10] rust: list: add macro for implementing ListItem
From: Alice Ryhl
Date: Wed Jul 31 2024 - 09:03:59 EST
On Tue, Jul 23, 2024 at 10:23 AM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
> +#[macro_export]
> +macro_rules! impl_list_item {
> + (
> + impl$({$($generics:tt)*})? ListItem<$num:tt> for $t:ty {
> + using ListLinks;
> + } $($rest:tt)*
This uses $($rest:tt)* but does not call itself at the end. This means
that trying to use this macro with several impl blocks results in
additional impl blocks being silently swallowed. The macro should use
repetition properly here.
Alice