Skip to content

Commit

Permalink
Add test for tuple indexed with float in macro input
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay authored and petrochenkov committed Jul 2, 2020
1 parent 6dfa549 commit 3814eec
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions 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() {}
11 changes: 11 additions & 0 deletions 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

0 comments on commit 3814eec

Please sign in to comment.