Open
Description
According to chapter 3.1., a metavariable must appear in exactly the same number, kind, and nesting order of repetitions in the transcriber as it did in the matcher. Based on this, I expected the following code (playground) not to compile, but it does compile without error.
macro_rules! repeat1 {
($($x:expr),+) => {
$(let _ = $x;)*
};
}
macro_rules! repeat2 {
($($x:expr),+) => {
$(let _ = $x;)?
};
}
macro_rules! repeat3 {
($($x:expr),*) => {
$(let _ = $x;)?
};
}
fn main() {
repeat1!(1,2,3);
repeat2!(1,2,3);
repeat3!(1,2,3);
}