Commit 96bea55
authored
Rollup merge of #157438 - qaijuang:rustdoc-hidden-assoc-type-link, r=notriddle
rustdoc: don't link doc(hidden) associated type projections
Rustdoc renders associated type projections like `T::Foo` by linking `Foo` to the containing trait page and appending `#associatedtype.Foo`.
For `#[doc(hidden)]` associated types, that anchor is not rendered in normal docs, so this can produce dangling links.
This PR checks the corresponding trait associated item before emitting the projection link.
When the associated type is hidden, rustdoc leaves the projection text plain, accounting for `--document-hidden-items` as well.
Fixes rust-lang/rust#151454.0 file changed
0 commit comments