Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustdoc does not populate documentation from external traits #9999

Closed
alexcrichton opened this issue Oct 21, 2013 · 2 comments
Closed

Rustdoc does not populate documentation from external traits #9999

alexcrichton opened this issue Oct 21, 2013 · 2 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@alexcrichton
Copy link
Member

If a type implements a trait which was defined in an external crate, then the documentation on the methods along with the default methods will not be shown in the documentation for the host crate.

I don't think that there's a large number of other issues with cross-crate documentation, so I'm not going to make this a blanket "cross-crate rustdoc needs" work issue.

Soon, cross-crate implementations of traits will not slurp in the default methods to show in the implementation documentation as well. Notable this means that TreeMap won't show up as having an insert method. This is bad.

alexcrichton added a commit to alexcrichton/rust that referenced this issue Oct 21, 2013
This does not work for cross-crate implementations of traits. Cross-crate
implementations are a separate issue that should be addressed separately.
Basically when an implementation of an external trait is detected, the trait
would have to be loaded at that time (or possibly sooner...). Rustdoc currently
doesn't have the proper infrastructure for adding this.

Closes rust-lang#9985
cc rust-lang#9999
@huonw
Copy link
Member

huonw commented May 25, 2014

@alexcrichton did #14346 fix this satisfactorily?

@alexcrichton
Copy link
Member Author

Aha, it did indeed! For example HashMap now says it has an insert method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants