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

Have rustdoc document private items, except use and extern crate #27104

Closed
SimonSapin opened this issue Jul 18, 2015 · 0 comments · Fixed by #32055
Closed

Have rustdoc document private items, except use and extern crate #27104

SimonSapin opened this issue Jul 18, 2015 · 0 comments · Fixed by #32055
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@SimonSapin
Copy link
Contributor

Rustdoc defaults to only documented things that are public, i.e. things that the user of a library would care about. This is a good default, but rustdoc can also be useful to people working on large crates by documenting these crates themselves. In that case, it’s preferable to also include private types, fields, functions, and methods.
#15347 was about this use case, and was closed with this solution:

rustdoc --no-defaults --passes "collapse-docs unindent-comments"

We just tried this on http://doc.servo.org/ . It’s better than before, but has the unexpected side effect that every use item (including non-pub and the implicit prelude) and every extern crate (including the implicit std) is documented under “Reexports”. It can get pretty noisy:

screenshot from 2015-07-18 13-11-44

They’re technically part of the crate, but don’t provide useful information. Could rustdoc split up the strip-private pass into one that strips private use and extern crate, and one for everything else?

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

Successfully merging a pull request may close this issue.

2 participants