about summary refs log tree commit diff
path: root/tests/ui/macros/missing-bang-in-decl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/macros/missing-bang-in-decl.rs')
-rw-r--r--tests/ui/macros/missing-bang-in-decl.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/macros/missing-bang-in-decl.rs b/tests/ui/macros/missing-bang-in-decl.rs
new file mode 100644
index 00000000000..8393f15fc52
--- /dev/null
+++ b/tests/ui/macros/missing-bang-in-decl.rs
@@ -0,0 +1,16 @@
+// run-rustfix
+
+#![allow(unused_macros)]
+
+macro_rules foo {
+    //~^ ERROR expected `!` after `macro_rules`
+    () => {};
+}
+
+macro_rules bar! {
+    //~^ ERROR expected `!` after `macro_rules`
+    //~^^ ERROR macro names aren't followed by a `!`
+    () => {};
+}
+
+fn main() {}