1 // aux-build:proc_macro_sequence.rs
3 // Regression test for issue #62831: Check that multiple sequences with the same span in the
4 // left-hand side of a macro definition behave as if they had unique spans, and in particular that
5 // they don't crash the compiler.
7 #![allow(unused_macros)]
9 extern crate proc_macro_sequence;
11 // When ignoring spans, this macro has the same macro definition as `generated_foo` in
12 // `proc_macro_sequence.rs`.
13 macro_rules! manual_foo {
14 (1 $x:expr $($y:tt,)* //~ERROR `$x:expr` may be followed by `$y:tt`
15 $(= $z:tt)* //~ERROR `$x:expr` may be followed by `=`
19 proc_macro_sequence::make_foo!(); //~ERROR `$x:expr` may be followed by `$y:tt`
20 //~^ERROR `$x:expr` may be followed by `=`