-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
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
A
should link to the original documentation forB::C
- In addition, the documentation for
B::C
should 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.
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.