From bc64185a25ba4e96d644911d361ab112f9b33d1e Mon Sep 17 00:00:00 2001 From: Austin Henriksen Date: Tue, 15 Nov 2022 16:24:09 -0500 Subject: [PATCH] Added test case for spaces after trailing commas in macro match arms. --- tests/source/macro_rules.rs | 1 + tests/target/macro_rules.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/source/macro_rules.rs b/tests/source/macro_rules.rs index 5aaca0c83fa..f480385ae2f 100644 --- a/tests/source/macro_rules.rs +++ b/tests/source/macro_rules.rs @@ -4,6 +4,7 @@ macro_rules! m { () => (); ( $ x : ident ) => (); ( $ m1 : ident , $ m2 : ident , $ x : ident ) => (); + ( $ m1 : ident , $ m2 : ident , $ x : ident , ) => (); ( $($beginning:ident),*;$middle:ident;$($end:ident),* ) => (); ( $($beginning: ident),*; $middle: ident; $($end: ident),*; $($beginning: ident),*; $middle: ident; $($end: ident),* ) => {}; ( $ name : ident ( $ ( $ dol : tt $ var : ident ) * ) $ ( $ body : tt ) * ) => (); diff --git a/tests/target/macro_rules.rs b/tests/target/macro_rules.rs index 5e7512470dc..b19813203d9 100644 --- a/tests/target/macro_rules.rs +++ b/tests/target/macro_rules.rs @@ -4,6 +4,7 @@ macro_rules! m { () => {}; ($x:ident) => {}; ($m1:ident, $m2:ident, $x:ident) => {}; + ($m1:ident, $m2:ident, $x:ident,) => {}; ($($beginning:ident),*; $middle:ident; $($end:ident),*) => {}; ( $($beginning:ident),*;