]> git.lizzy.rs Git - rust.git/commitdiff
Update tests for #2438 and #2476
authortopecongiro <seuchida@gmail.com>
Thu, 22 Feb 2018 23:10:17 +0000 (08:10 +0900)
committertopecongiro <seuchida@gmail.com>
Thu, 22 Feb 2018 23:10:17 +0000 (08:10 +0900)
rustfmt-core/tests/source/macro_rules.rs
rustfmt-core/tests/target/macro_rules.rs

index 33465d207e2d6be2e4b0b61291bb7914e3d0a67e..dba1d78f0dd35e56ad756ff64f95e2df8d0abcca 100644 (file)
@@ -1,3 +1,5 @@
+// rustfmt-error_on_line_overflow: false
+
 macro_rules! m {
        // a
        ($expr :expr,  $( $func : ident    ) *   ) => {
@@ -50,12 +52,37 @@ macro_rules! m {
 }
 }
 
-
-// #2438
+// #2438, #2476
+macro_rules! m {
+    () => {
+        fn foo() {
+            this_line_is_98_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
+            );
+        }
+    }
+}
+macro_rules! m {
+    () => {
+        fn foo() {
+            this_line_is_99_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
+);
+        }
+    };
+}
+macro_rules! m {
+    () => {
+        fn foo() {
+            this_line_is_100_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
+);
+        }
+    };
+}
 macro_rules! m {
     () => {
-        this_line_is_99_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
-        ); // this line is drifting
+        fn foo() {
+            this_line_is_101_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
+            );
+        }
     };
 }
 
index 3f93124137e2a350ee490172fde8860a416a1f97..2136784dec77e2165f5a8db3b05961da1a694317 100644 (file)
@@ -1,3 +1,5 @@
+// rustfmt-error_on_line_overflow: false
+
 macro_rules! m {
     // a
     ($expr: expr, $($func: ident)*) => {{
@@ -42,11 +44,36 @@ mod macro_item {
     }
 }
 
-// #2438
+// #2438, #2476
 macro_rules! m {
     () => {
-        this_line_is_99_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
-        ); // this line is drifting
+        fn foo() {
+            this_line_is_98_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx();
+        }
+    };
+}
+macro_rules! m {
+    () => {
+        fn foo() {
+            this_line_is_99_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
+            );
+        }
+    };
+}
+macro_rules! m {
+    () => {
+        fn foo() {
+            this_line_is_100_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
+            );
+        }
+    };
+}
+macro_rules! m {
+    () => {
+        fn foo() {
+            this_line_is_101_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
+            );
+        }
     };
 }