diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/rustfmt/tests/source/configs/format_macro_matchers/false.rs | 7 | ||||
-rw-r--r-- | src/tools/rustfmt/tests/source/configs/format_macro_matchers/true.rs | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/configs/format_macro_matchers/false.rs b/src/tools/rustfmt/tests/source/configs/format_macro_matchers/false.rs new file mode 100644 index 000000000..a721bb55c --- /dev/null +++ b/src/tools/rustfmt/tests/source/configs/format_macro_matchers/false.rs @@ -0,0 +1,7 @@ +// rustfmt-format_macro_matchers: false + +macro_rules! foo { + ($a: ident : $b: ty) => { $a(42): $b; }; + ($a: ident $b: ident $c: ident) => { $a=$b+$c; }; +} + diff --git a/src/tools/rustfmt/tests/source/configs/format_macro_matchers/true.rs b/src/tools/rustfmt/tests/source/configs/format_macro_matchers/true.rs new file mode 100644 index 000000000..fa0442e22 --- /dev/null +++ b/src/tools/rustfmt/tests/source/configs/format_macro_matchers/true.rs @@ -0,0 +1,6 @@ +// rustfmt-format_macro_matchers: true + +macro_rules! foo { + ($a: ident : $b: ty) => { $a(42): $b; }; + ($a: ident $b: ident $c: ident) => { $a=$b+$c; }; +} |