]> git.lizzy.rs Git - rust.git/commitdiff
Add a test for #2487
authortopecongiro <seuchida@gmail.com>
Sat, 24 Feb 2018 02:48:07 +0000 (11:48 +0900)
committertopecongiro <seuchida@gmail.com>
Sat, 24 Feb 2018 02:48:07 +0000 (11:48 +0900)
rustfmt-core/tests/source/macros.rs
rustfmt-core/tests/target/macros.rs

index ffd5c19cc8c90fca0d67857334108df815d70b4d..11e6d52c6c8e8ba0641d0305f25ff3e7807bcf8d 100644 (file)
@@ -336,3 +336,7 @@ fn foo() {
 macro lex_err($kind: ident $(, $body: expr)*) {
     Err(QlError::LexError(LexError::$kind($($body,)*)))
 }
+
+// Preserve trailing comma on item-level macro with `()` or `[]`.
+methods![ get, post, delete, ];
+methods!( get, post, delete, );
index 9b32c6623bbd56e05e2d94aa4f305e2c283cc643..15a46a0c23506c8f0d24ba9d52d580b7e69061d0 100644 (file)
@@ -911,3 +911,7 @@ fn foo() {
 macro lex_err($kind: ident $(, $body: expr)*) {
     Err(QlError::LexError(LexError::$kind($($body,)*)))
 }
+
+// Preserve trailing comma on item-level macro with `()` or `[]`.
+methods![get, post, delete,];
+methods!(get, post, delete,);