diff --git a/src/test/ui/tuple/indexing-in-macro.rs b/src/test/ui/tuple/indexing-in-macro.rs new file mode 100644 index 00000000000..89696cd7fcf --- /dev/null +++ b/src/test/ui/tuple/indexing-in-macro.rs @@ -0,0 +1,9 @@ +// Broken by https://github.com/rust-lang/rust/pull/70420. + +macro_rules! m { + (.$l:literal) => {}; +} + +m!(.0.0); //~ ERROR no rules expected the token `.` + +fn main() {} diff --git a/src/test/ui/tuple/indexing-in-macro.stderr b/src/test/ui/tuple/indexing-in-macro.stderr new file mode 100644 index 00000000000..78879262b01 --- /dev/null +++ b/src/test/ui/tuple/indexing-in-macro.stderr @@ -0,0 +1,11 @@ +error: no rules expected the token `.` + --> $DIR/indexing-in-macro.rs:7:6 + | +LL | macro_rules! m { + | -------------- when calling this macro +... +LL | m!(.0.0); + | ^ no rules expected this token in macro call + +error: aborting due to previous error +