diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2025-03-10 15:58:41 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2025-03-11 17:03:00 +0000 |
| commit | 85b1116a18595794da07c53642eefd81ff775faf (patch) | |
| tree | f3da58a4cf6d6daa5a25a19f58092b7259abf5a9 | |
| parent | 28bd22c3d9a477ff9b7b85782fb517c29b58ed88 (diff) | |
| download | rust-85b1116a18595794da07c53642eefd81ff775faf.tar.gz rust-85b1116a18595794da07c53642eefd81ff775faf.zip | |
rustdoc: Add FIXME test for `doc_cfg` interaction with `check_cfg`
| -rw-r--r-- | tests/rustdoc-ui/doc-cfg-check-cfg.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/doc-cfg-check-cfg.rs b/tests/rustdoc-ui/doc-cfg-check-cfg.rs new file mode 100644 index 00000000000..e3420dc0789 --- /dev/null +++ b/tests/rustdoc-ui/doc-cfg-check-cfg.rs @@ -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() {} |
