diff options
| author | bors <bors@rust-lang.org> | 2025-09-30 02:34:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-09-30 02:34:18 +0000 |
| commit | c5dc558e6cca43958616b268b66c49763f2e9e9a (patch) | |
| tree | f17b1e32da607c0a1d454ba91846b5203ecb7eb3 /tests/rustdoc/doc-auto-cfg-public-in-private.rs | |
| parent | 29b7717de23f3969ceeb5bef5b01d9223f807655 (diff) | |
| parent | 745b8f6b746724365c8bb23c0dcec56471c30400 (diff) | |
| download | rust-c5dc558e6cca43958616b268b66c49763f2e9e9a.tar.gz rust-c5dc558e6cca43958616b268b66c49763f2e9e9a.zip | |
Auto merge of #147169 - jhpratt:rollup-65ooei8, r=jhpratt
Rollup of 4 pull requests Successful merges: - rust-lang/rust#145883 (Make macOS dist build configuration match where reasonable) - rust-lang/rust#146457 (Skip cleanups on unsupported targets) - rust-lang/rust#147152 (builtin `Fn`-trait impls: instantiate binder before the return type `Sized` check) - rust-lang/rust#147153 ([rustdoc] Move doc cfg propagation pass before items stripping passes) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'tests/rustdoc/doc-auto-cfg-public-in-private.rs')
| -rw-r--r-- | tests/rustdoc/doc-auto-cfg-public-in-private.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/rustdoc/doc-auto-cfg-public-in-private.rs b/tests/rustdoc/doc-auto-cfg-public-in-private.rs new file mode 100644 index 00000000000..b78e3f1b932 --- /dev/null +++ b/tests/rustdoc/doc-auto-cfg-public-in-private.rs @@ -0,0 +1,16 @@ +// This test ensures that even though private items are removed from generated docs, +// their `cfg`s will still impact their child items. + +#![feature(doc_cfg)] +#![crate_name = "foo"] + +pub struct X; + +#[cfg(not(feature = "blob"))] +fn foo() { + impl X { + //@ has 'foo/struct.X.html' + //@ has - '//*[@class="stab portability"]' 'Available on non-crate feature blob only.' + pub fn bar() {} + } +} |
