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
A should link to the original documentation for B::C
- In addition, the documentation for
B::C should list all the known name it is re-exported as (in this case A::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.
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
StrSlicetrait 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
Acontains apub use B::C;statement:A::CAshould link to the original documentation forB::CB::Cshould list all the known name it is re-exported as (in this caseA::C).It gets more complicated when
AandBare not in the same source repository, but IMO still worth pursuing. Sphinx does support cross-references to other repos.