Re: [PATCH v3 05/10] rust: list: add macro for implementing ListItem

Alice Ryhl
2024-07-31T13:03:40Z

On Tue, Jul 23, 2024 at 10:23 AM Alice Ryhl <aliceryhl@google.com> 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