about summary refs log tree commit diff
path: root/tests/rustdoc-ui/doc_cfg_hide.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc-ui/doc_cfg_hide.rs')
-rw-r--r--tests/rustdoc-ui/doc_cfg_hide.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/doc_cfg_hide.rs b/tests/rustdoc-ui/doc_cfg_hide.rs
new file mode 100644
index 00000000000..5d8791748a0
--- /dev/null
+++ b/tests/rustdoc-ui/doc_cfg_hide.rs
@@ -0,0 +1,11 @@
+#![feature(doc_cfg_hide)]
+#![deny(warnings)]
+
+#![doc(cfg_hide = "test")] //~ ERROR
+//~^ WARN
+#![doc(cfg_hide)] //~ ERROR
+//~^ WARN
+
+#[doc(cfg_hide(doc))] //~ ERROR
+//~^ WARN
+pub fn foo() {}