about summary refs log tree commit diff
path: root/tests/ui/underscore-ident-matcher.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/underscore-ident-matcher.rs')
-rw-r--r--tests/ui/underscore-ident-matcher.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/underscore-ident-matcher.rs b/tests/ui/underscore-ident-matcher.rs
new file mode 100644
index 00000000000..bddc8c80a7b
--- /dev/null
+++ b/tests/ui/underscore-ident-matcher.rs
@@ -0,0 +1,9 @@
+macro_rules! identity {
+    ($i: ident) => (
+        $i
+    )
+}
+
+fn main() {
+    let identity!(_) = 10; //~ ERROR no rules expected the token `_`
+}