Description
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:
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?