summaryrefslogtreecommitdiffstats
path: root/tests/run-make/rustdoc-scrape-examples-macros/examples/ex.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/rustdoc-scrape-examples-macros/examples/ex.rs')
-rw-r--r--tests/run-make/rustdoc-scrape-examples-macros/examples/ex.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/run-make/rustdoc-scrape-examples-macros/examples/ex.rs b/tests/run-make/rustdoc-scrape-examples-macros/examples/ex.rs
new file mode 100644
index 000000000..4d8c8b30e
--- /dev/null
+++ b/tests/run-make/rustdoc-scrape-examples-macros/examples/ex.rs
@@ -0,0 +1,27 @@
+extern crate foobar;
+extern crate foobar_macro;
+
+use foobar::*;
+use foobar_macro::*;
+
+a_proc_macro!(); // no
+
+#[an_attr_macro]
+fn a() {
+ f(); // no
+}
+
+#[an_attr_macro(with_span)]
+fn b() {
+ f(); // yes
+}
+
+fn c() {
+ a_rules_macro!(f()); // yes
+}
+
+fn d() {
+ a_rules_macro!(()); // no
+}
+
+fn main(){}