Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 85b1116

Browse files
committedMar 11, 2025
rustdoc: Add FIXME test for doc_cfg interaction with check_cfg
1 parent 28bd22c commit 85b1116

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
 

‎tests/rustdoc-ui/doc-cfg-check-cfg.rs

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Ensure that `doc(cfg())` respects `check-cfg`
2+
// Currently not properly working
3+
#![feature(doc_cfg)]
4+
#![deny(unexpected_cfgs)]
5+
6+
//@revisions: no_check cfg_empty cfg_foo
7+
//@[cfg_empty] compile-flags: --check-cfg cfg()
8+
//@[cfg_foo] compile-flags: --check-cfg cfg(foo)
9+
10+
//@[no_check] check-pass
11+
//@[cfg_empty] check-pass
12+
//@[cfg_empty] known-bug: #138358
13+
//@[cfg_foo] check-pass
14+
15+
#[doc(cfg(foo))]
16+
pub fn foo() {}

0 commit comments

Comments
 (0)
Failed to load comments.