summaryrefslogtreecommitdiff
path: root/samples/test
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2019-05-28 14:42:59 -0700
committerMichael Howell <michael@notriddle.com>2019-05-28 14:42:59 -0700
commitf41f2197456be87c7c63582dbeee4667bfae35e8 (patch)
tree4ec4b3c7c7d3b696317d737a8d83dd320a8fa011 /samples/test
parent3f44cece3931baccea9835b08bd5ad11aa59dab0 (diff)
downloadmrust-f41f2197456be87c7c63582dbeee4667bfae35e8.tar.gz
Allow square brackets in macro definitions
Fixes #103
Diffstat (limited to 'samples/test')
-rw-r--r--samples/test/issue-mrustc-103.rs9
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];
+}
+