Macro repeat pattern

Hi dear community,

I define a macro rules like

macro_rules! impl_get_self => {
  ($func_name:ident, [$($T:ident, $R: ident),*])
}

but it doesn't work for one time repeat?
impl_get_self!(get_self_2, [A,r1,B,r2]); works well but
impl_get_self!(get_self, [A,r1]) do not work.
isn't ,* means match 0 or more repeating pattern?

Are you sure?

2 Likes

sry i made some mistake lol

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.