]> git.lizzy.rs Git - rust.git/commitdiff
Add tests for #2749
authorSeiichi Uchida <seuchida@gmail.com>
Tue, 29 May 2018 23:09:56 +0000 (08:09 +0900)
committerSeiichi Uchida <seuchida@gmail.com>
Tue, 29 May 2018 23:44:57 +0000 (08:44 +0900)
tests/source/macro_rules.rs
tests/target/macro_rules.rs

index 51c80ad5b7dd115a3ad972185e489705f1715880..5ed5f90588300cbaa295c784482e221723cd30ad 100644 (file)
@@ -194,3 +194,13 @@ macro_rules! m {
     ($x:) => {};
     ($($foo:expr)()?) => {};
 }
     ($x:) => {};
     ($($foo:expr)()?) => {};
 }
+
+// #2749
+macro_rules! foo {
+    ($(x)* {}) => {};
+    ($(x)* ()) => {};
+    ($(x)* []) => {};
+}
+macro_rules! __wundergraph_expand_sqlite_mutation {
+    ( $mutation_name:ident $((context = $($context:tt)*))*{ $( $entity_name:ident( $(insert = $insert:ident,)* $(update = $update:ident,)* $(delete = $($delete:tt)+)* ), )* } ) => {};
+}
index 451e78cb3a861a76413286dad73b228f02e6f59b..c366d75cf9165ae0925475d1c028fb3b9a989a8b 100644 (file)
@@ -226,3 +226,23 @@ macro_rules! m {
     ($x:) => {};
     ($($foo:expr)()?) => {};
 }
     ($x:) => {};
     ($($foo:expr)()?) => {};
 }
+
+// #2749
+macro_rules! foo {
+    ($(x)* {}) => {};
+    ($(x)*()) => {};
+    ($(x)*[]) => {};
+}
+macro_rules! __wundergraph_expand_sqlite_mutation {
+    (
+        $mutation_name:ident $((context = $($context:tt)*))* {
+            $(
+                $entity_name:ident(
+                    $(insert = $insert:ident,)*
+                    $(update = $update:ident,)*
+                    $(delete = $($delete:tt)+)*
+                ),
+            )*
+        }
+    ) => {};
+}