about summary refs log tree commit diff
path: root/tests/ui/parser/macro/trait-non-item-macros.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/parser/macro/trait-non-item-macros.stderr')
-rw-r--r--tests/ui/parser/macro/trait-non-item-macros.stderr22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/parser/macro/trait-non-item-macros.stderr b/tests/ui/parser/macro/trait-non-item-macros.stderr
new file mode 100644
index 00000000000..db20e6b24aa
--- /dev/null
+++ b/tests/ui/parser/macro/trait-non-item-macros.stderr
@@ -0,0 +1,22 @@
+error: macro expansion ignores token `2` and any following
+  --> $DIR/trait-non-item-macros.rs:3:9
+   |
+LL |         $a
+   |         ^^
+...
+LL |     bah!(2);
+   |     ------- caused by the macro expansion here
+   |
+   = note: the usage of `bah!` is likely invalid in trait item context
+
+error[E0308]: mismatched types
+  --> $DIR/trait-non-item-macros.rs:12:33
+   |
+LL |     let _recovery_witness: () = 0;
+   |                            --   ^ expected `()`, found integer
+   |                            |
+   |                            expected due to this
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.