diff options
| author | Michael Goulet <michael@errs.io> | 2024-01-22 01:18:16 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-01-22 01:49:33 +0000 |
| commit | 981e8b46c5bbb78bf39207bbfb8fe6f8d6ba853e (patch) | |
| tree | 7b9cafb35a4cff6446b7f46370b20bdc818047e0 /src/tools/rustfmt/tests | |
| parent | ef71f1047e04438181d7cb925a833e2ada6ab390 (diff) | |
| download | rust-981e8b46c5bbb78bf39207bbfb8fe6f8d6ba853e.tar.gz rust-981e8b46c5bbb78bf39207bbfb8fe6f8d6ba853e.zip | |
Check that a token can begin a nonterminal kind before parsing it as a macro arg in rustfmt
Diffstat (limited to 'src/tools/rustfmt/tests')
| -rw-r--r-- | src/tools/rustfmt/tests/source/macros/rewrite-const-item.rs | 1 | ||||
| -rw-r--r-- | src/tools/rustfmt/tests/target/macros/rewrite-const-item.rs | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/macros/rewrite-const-item.rs b/src/tools/rustfmt/tests/source/macros/rewrite-const-item.rs new file mode 100644 index 00000000000..3db2c26ab5a --- /dev/null +++ b/src/tools/rustfmt/tests/source/macros/rewrite-const-item.rs @@ -0,0 +1 @@ +m!(const N: usize = 0;); diff --git a/src/tools/rustfmt/tests/target/macros/rewrite-const-item.rs b/src/tools/rustfmt/tests/target/macros/rewrite-const-item.rs new file mode 100644 index 00000000000..f7ebaf78277 --- /dev/null +++ b/src/tools/rustfmt/tests/target/macros/rewrite-const-item.rs @@ -0,0 +1,3 @@ +m!( + const N: usize = 0; +); |
