Add an test for #2652
This commit is contained in:
parent
d19fc450c0
commit
121f5e4e42
2 changed files with 16 additions and 0 deletions
|
@ -380,3 +380,11 @@ fn foo() {
|
|||
foo!(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
|
||||
foo!(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,);
|
||||
}
|
||||
|
||||
// #2652
|
||||
// Preserve trailing comma inside macro, even if it looks an array.
|
||||
macro_rules! bar {
|
||||
($m:ident) => {
|
||||
$m!([a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z]);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -961,3 +961,11 @@ fn foo() {
|
|||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
);
|
||||
}
|
||||
|
||||
// #2652
|
||||
// Preserve trailing comma inside macro, even if it looks an array.
|
||||
macro_rules! bar {
|
||||
($m:ident) => {
|
||||
$m!([a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z]);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue