rustdoc: Add FIXME test for doc_cfg
interaction with check_cfg
This commit is contained in:
parent
28bd22c3d9
commit
85b1116a18
1 changed files with 16 additions and 0 deletions
16
tests/rustdoc-ui/doc-cfg-check-cfg.rs
Normal file
16
tests/rustdoc-ui/doc-cfg-check-cfg.rs
Normal 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() {}
|
Loading…
Add table
Add a link
Reference in a new issue