rustdoc: Add FIXME test for doc_cfg interaction with check_cfg

This commit is contained in:
clubby789 2025-03-10 15:58:41 +00:00
parent 28bd22c3d9
commit 85b1116a18

View file

@ -0,0 +1,16 @@
// Ensure that `doc(cfg())` respects `check-cfg`
// Currently not properly working
#![feature(doc_cfg)]
#![deny(unexpected_cfgs)]
//@revisions: no_check cfg_empty cfg_foo
//@[cfg_empty] compile-flags: --check-cfg cfg()
//@[cfg_foo] compile-flags: --check-cfg cfg(foo)
//@[no_check] check-pass
//@[cfg_empty] check-pass
//@[cfg_empty] known-bug: #138358
//@[cfg_foo] check-pass
#[doc(cfg(foo))]
pub fn foo() {}