diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2025-03-09 23:42:48 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2025-03-10 14:18:56 +0000 |
| commit | 28bd22c3d9a477ff9b7b85782fb517c29b58ed88 (patch) | |
| tree | c8dc0b6546879027c1e59e5a9a28753a0f56d4c0 /tests/rustdoc-ui/doc-cfg-unstable.rs | |
| parent | 3ea711f17e3946ac3f4df11691584e2c56b4b0cf (diff) | |
| download | rust-28bd22c3d9a477ff9b7b85782fb517c29b58ed88.tar.gz rust-28bd22c3d9a477ff9b7b85782fb517c29b58ed88.zip | |
rustdoc: Gate unstable `doc(cfg())` predicates
Diffstat (limited to 'tests/rustdoc-ui/doc-cfg-unstable.rs')
| -rw-r--r-- | tests/rustdoc-ui/doc-cfg-unstable.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/doc-cfg-unstable.rs b/tests/rustdoc-ui/doc-cfg-unstable.rs new file mode 100644 index 00000000000..14c2e83ec85 --- /dev/null +++ b/tests/rustdoc-ui/doc-cfg-unstable.rs @@ -0,0 +1,10 @@ +// #138113: rustdoc didn't gate unstable predicates inside `doc(cfg(..))` +#![feature(doc_cfg)] + +// `cfg_boolean_literals` +#[doc(cfg(false))] //~ ERROR `cfg(false)` is experimental and subject to change +pub fn cfg_boolean_literals() {} + +// `cfg_version` +#[doc(cfg(sanitize = "thread"))] //~ ERROR `cfg(sanitize)` is experimental and subject to change +pub fn cfg_sanitize() {} |
