]> git.lizzy.rs Git - rust.git/blobdiff - tests/target/macros.rs
Preserve trailing comma on macro call when using mixed layout
[rust.git] / tests / target / macros.rs
index d430f5711dd8e7d034cfc9aa68b5c380d1250caf..76e538bb85d49fe6a0a0426778153b73a6d87831 100644 (file)
@@ -948,3 +948,16 @@ fn foo() {
 fn foo() {
     let _ = column!(/* here */);
 }
+
+// #2616
+// Preserve trailing comma when using mixed layout for macro call.
+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,
+    );
+}