Context
https://users.rust-lang.org/t/hidden-trait-implementation-in-online-docs/61256/4
Repro
set -euo pipefail
cd $(mktemp -d)
cargo new -q --lib dependency
cat> dependency/src/lib.rs <<'EOF'
#[doc(hidden)]
pub enum HiddenType {}
pub enum MyLibType {}
impl From<HiddenType> for MyLibType {
fn from (it: HiddenType)
-> MyLibType
{
match it {}
}
}
EOF
(cd dependency
set -x
cargo doc -q --no-deps
# No matches
! grep -o HiddenType target/doc/dependency/index.html
)
cargo init -q --lib --name mylib
cat> src/lib.rs <<'EOF'
pub use ::dependency::HiddenType; // OK, not re-exported
pub enum MyLibType {}
impl From<HiddenType> for MyLibType {
fn from (it: HiddenType)
-> MyLibType
{
match it {}
}
}
EOF
cat>> Cargo.toml <<'EOF'
dependency.path = 'dependency'
EOF
set -x
cargo doc -q --no-deps
# No matches
! grep -o HiddenType target/doc/mylib/index.html
# There are matches
grep -o HiddenType target/doc/mylib/enum.MyLibType.html
@rustbot label C-bug T-rustdoc
cc @GuillaumeGomez
Context
https://users.rust-lang.org/t/hidden-trait-implementation-in-online-docs/61256/4
Repro
Last line yields several occurrences of
HiddenTypein the generated.htmlfile.Expected behavior
No occurrences of
HiddenTypeanywhere since it was#[doc(hidden)]Playground
@rustbot label C-bug T-rustdoc
cc @GuillaumeGomez