about summary refs log tree commit diff
path: root/tests/ui/macros/macro-fragment-ident-underscore-error.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/macros/macro-fragment-ident-underscore-error.stderr')
-rw-r--r--tests/ui/macros/macro-fragment-ident-underscore-error.stderr17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/macros/macro-fragment-ident-underscore-error.stderr b/tests/ui/macros/macro-fragment-ident-underscore-error.stderr
new file mode 100644
index 00000000000..0c3f980cf6c
--- /dev/null
+++ b/tests/ui/macros/macro-fragment-ident-underscore-error.stderr
@@ -0,0 +1,17 @@
+error: no rules expected reserved identifier `_`
+  --> $DIR/underscore-ident-matcher.rs:8:19
+   |
+LL | macro_rules! identity {
+   | --------------------- when calling this macro
+...
+LL |     let identity!(_) = 10;
+   |                   ^ no rules expected this token in macro call
+   |
+note: while trying to match meta-variable `$i:ident`
+  --> $DIR/underscore-ident-matcher.rs:2:6
+   |
+LL |     ($i: ident) => (
+   |      ^^^^^^^^^
+
+error: aborting due to 1 previous error
+