summaryrefslogtreecommitdiffstats
path: root/tests/ui/macros/user-defined-macro-rules.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/macros/user-defined-macro-rules.rs')
-rw-r--r--tests/ui/macros/user-defined-macro-rules.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/macros/user-defined-macro-rules.rs b/tests/ui/macros/user-defined-macro-rules.rs
new file mode 100644
index 000000000..09e071ec4
--- /dev/null
+++ b/tests/ui/macros/user-defined-macro-rules.rs
@@ -0,0 +1,9 @@
+// check-pass
+
+macro_rules! macro_rules { () => { struct S; } } // OK
+
+macro_rules! {} // OK, calls the macro defined above
+
+fn main() {
+ let s = S;
+}