diff options
author | Michael Howell <michael@notriddle.com> | 2019-05-28 14:42:59 -0700 |
---|---|---|
committer | Michael Howell <michael@notriddle.com> | 2019-05-28 14:42:59 -0700 |
commit | f41f2197456be87c7c63582dbeee4667bfae35e8 (patch) | |
tree | 4ec4b3c7c7d3b696317d737a8d83dd320a8fa011 /samples/test | |
parent | 3f44cece3931baccea9835b08bd5ad11aa59dab0 (diff) | |
download | mrust-f41f2197456be87c7c63582dbeee4667bfae35e8.tar.gz |
Allow square brackets in macro definitions
Fixes #103
Diffstat (limited to 'samples/test')
-rw-r--r-- | samples/test/issue-mrustc-103.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/samples/test/issue-mrustc-103.rs b/samples/test/issue-mrustc-103.rs new file mode 100644 index 00000000..f27fe6de --- /dev/null +++ b/samples/test/issue-mrustc-103.rs @@ -0,0 +1,9 @@ +macro_rules! pat { + [$a:expr;$b:expr] => ( + println!("{} {}", $a, $b); + ) +} +fn main() { + pat![4;5]; +} + |