about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-07-06 11:28:32 +0000
committerbors <bors@rust-lang.org>2017-07-06 11:28:32 +0000
commitccf401f8f7847413ac43f38e3c86016becf67b07 (patch)
tree9f5e1653722b8bf4a16d05974ef32432e798b0e7 /src/test
parentafb853a3d742ada964ea06cccd422b08ea250cd3 (diff)
parent06e1fc06d75e0bc67dcf90b1a12368775ede7ce0 (diff)
Auto merge of #43078 - kennytm:fix-42755-vis-can-be-empty, r=petrochenkov
Disallow `$($v:vis)*`. Fix #42755.

#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);