rustdocs are built from attributes which are (should be) stored in the crate metadata. rustdoc should be able to construct the crate documentation from the crate metadata with nearly the same fidelity as from the original source.
Update(2024, fmease): In today's terms, this essentially asks for the option1 to build docs based on rustc_middle::ty instead of the HIR in the all cases, not just for inlined cross-crate re-exports and synthetic impls.
rustdocs are built from attributes which are (should be) stored in the crate metadata. rustdoc should be able to construct the crate documentation from the crate metadata with nearly the same fidelity as from the original source.
Update(2024, fmease): In today's terms, this essentially asks for the option1 to build docs based on
rustc_middle::tyinstead of the HIR in the all cases, not just for inlined cross-crate re-exports and synthetic impls.Footnotes
Some t-rustdoc members (incl. myself, @fmease) are even inclined to drop "HIR cleaning" entirely once the important A-cross-crate-reexportsArea: Documentation that has been re-exported from a different crate
issues have been addressed (which is non-trivial I have to add). In the long term, that move would greatly improve the correctness of rustdoc and make it easier to develop certain features. Namely anything that depends on more complex "type-based reasoning" (for which
rustc_middle::tyis a lot better suited compared to the HIR). ↩