Add test for #2558

When run against invalid macro definitions, rustfmt should leave
them unchanged rather than panic.
This commit is contained in:
codeworm96 2018-03-28 23:50:21 +08:00
parent e68682f6db
commit 38107192f1
2 changed files with 12 additions and 0 deletions

View File

@ -188,3 +188,9 @@ macro_rules! binary {
}
};
}
// #2558
macro_rules! m {
($x:) => {};
($($foo:expr)()?) => {};
}

View File

@ -220,3 +220,9 @@ macro_rules! binary {
}
};
}
// #2558
macro_rules! m {
($x:) => {};
($($foo:expr)()?) => {};
}