We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
doc_cfg
check_cfg
1 parent 28bd22c commit d2c53b7Copy full SHA for d2c53b7
tests/rustdoc-ui/doc-cfg-check-cfg.rs
@@ -0,0 +1,12 @@
1
+// Ensure that `doc(cfg())` respects `check-cfg`
2
+#![feature(doc_cfg)]
3
+
4
+//@revisions: no_check cfg_empty cfg_foo
5
+//@[cfg_empty] compile-flags: --check-cfg cfg()
6
+//@[cfg_foo] compile-flags: --check-cfg cfg(foo)
7
8
+//@[no_check] check-pass
9
+//@[cfg_foo] check-pass
10
11
+#[doc(cfg(foo))]
12
+pub fn foo() {}
0 commit comments