about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2017-07-06 08:18:58 +0800
committerkennytm <kennytm@gmail.com>2017-07-06 18:24:36 +0800
commit06e1fc06d75e0bc67dcf90b1a12368775ede7ce0 (patch)
tree9f5e1653722b8bf4a16d05974ef32432e798b0e7 /src/test
parentafb853a3d742ada964ea06cccd422b08ea250cd3 (diff)
Disallow `$($v:vis)*`. Fix #42755.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/issue-42755.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-42755.rs b/src/test/compile-fail/issue-42755.rs
new file mode 100644
index 00000000000..7547c4a17be
--- /dev/null
+++ b/src/test/compile-fail/issue-42755.rs
@@ -0,0 +1,17 @@
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(macro_vis_matcher)]
+
+macro_rules! foo {
+    ($($p:vis)*) => {} //~ ERROR repetition matches empty token tree
+}
+
+foo!(a);