blob: 77c94f24171ae81f0fe12f6be5894c1be9d2a0e5 [file] [log] [blame] [edit]
#![deny(meta_variable_misuse)]
macro_rules! foo {
() => {};
($( $i:ident = $($j:ident),+ );*) => { $( $i = $j; )* };
//~^ ERROR variable `j` is still repeating
}
macro_rules! bar {
() => {};
(test) => {
macro_rules! nested {
() => {};
($( $i:ident = $($j:ident),+ );*) => { $( $i = $j; )* };
//~^ ERROR variable `j` is still repeating
}
};
( $( $i:ident = $($j:ident),+ );* ) => {
$(macro_rules! $i {
() => { $j }; //~ ERROR variable `j` is still repeating
})*
};
}
fn main() {
foo!();
bar!();
}