summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-ui/doc-cfg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-ui/doc-cfg.rs')
-rw-r--r--tests/rustdoc-ui/doc-cfg.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/doc-cfg.rs b/tests/rustdoc-ui/doc-cfg.rs
new file mode 100644
index 000000000..354d76bc3
--- /dev/null
+++ b/tests/rustdoc-ui/doc-cfg.rs
@@ -0,0 +1,9 @@
+#![feature(doc_cfg)]
+
+#[doc(cfg(), cfg(foo, bar))]
+//~^ ERROR
+//~^^ ERROR
+#[doc(cfg(foo), cfg(bar))] // ok!
+#[doc(cfg())] //~ ERROR
+#[doc(cfg(foo, bar))] //~ ERROR
+pub fn foo() {}