-
Couldn't load subscription status.
- Fork 13.9k
Description
Update: This issue was first filed with the title "rustdoc shouldn’t document reexports separately", but that might not be the desired solution.
For example, the StrSlice trait is currently documented in three different places:
http://doc.rust-lang.org/std/str/trait.StrSlice.html
http://doc.rust-lang.org/collections/str/trait.StrSlice.html
http://doc.rust-lang.org/core/str/trait.StrSlice.html
It really is the same trait, but in the documentation they appear as distinct.
I think that, when module A contains a pub use B::C; statement:
- rustdoc should not create a new documentation page for
A::C - Instead, the documentation for
Ashould link to the original documentation forB::C - In addition, the documentation for
B::Cshould list all the known name it is re-exported as (in this caseA::C).
It gets more complicated when A and B are not in the same source repository, but IMO still worth pursuing. Sphinx does support cross-references to other repos.