Add test for tuple indexed with float in macro input

This commit is contained in:
David Tolnay 2020-03-26 09:40:05 -07:00 committed by Vadim Petrochenkov
parent 6dfa549fb5
commit 3814eec087
2 changed files with 20 additions and 0 deletions

View File

@ -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() {}

View File

@ -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