diff --git a/tests/source/macros.rs b/tests/source/macros.rs index 73044aa7ab2c..c8f769062542 100644 --- a/tests/source/macros.rs +++ b/tests/source/macros.rs @@ -204,3 +204,15 @@ macro_rules! try_opt { None => { return None; } }) } + +// #2214 +// macro call whose argument is an array with trailing comma. +fn issue2214() { +make_test!(str_searcher_ascii_haystack, "bb", "abbcbbd", [ + Reject(0, 1), + Match (1, 3), + Reject(3, 4), + Match (4, 6), + Reject(6, 7), +]); +} diff --git a/tests/target/macros.rs b/tests/target/macros.rs index a15dd14c9fb7..25156ff21fda 100644 --- a/tests/target/macros.rs +++ b/tests/target/macros.rs @@ -253,3 +253,20 @@ macro_rules! try_opt { None => { return None; } }) } + +// #2214 +// macro call whose argument is an array with trailing comma. +fn issue2214() { + make_test!( + str_searcher_ascii_haystack, + "bb", + "abbcbbd", + [ + Reject(0, 1), + Match(1, 3), + Reject(3, 4), + Match(4, 6), + Reject(6, 7), + ] + ); +}