Skip to content

Commit

Permalink
tweak docs for rustdoc's --show-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
QuietMisdreavus committed Feb 28, 2019
1 parent 1b63543 commit 74cf1ad
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/doc/rustdoc/src/unstable-features.md
Expand Up @@ -445,9 +445,13 @@ Some methodology notes about what rustdoc counts in this metric:

* Rustdoc will only count items from your crate (i.e. items re-exported from other crates don't
count).
* Since trait implementations can inherit documentation from their trait, separate totals are given
both with and without trait implementations.
* Inherent impl blocks are not counted, even though their doc comments are displayed, because the
common pattern in Rust code is to write all inherent methods into the same impl block.
* Docs written directly onto inherent impl blocks are not counted, even though their doc comments
are displayed, because the common pattern in Rust code is to write all inherent methods into the
same impl block.
* Items in a trait implementation are not counted, as those impls will inherit any docs from the
trait itself.
* By default, only public items are counted. To count private items as well, pass
`--document-private-items` at the same time.

Public items that are not documented can be seen with the built-in `missing_docs` lint. Private
items that are not documented can be seen with Clippy's `missing_docs_in_private_items` lint.

0 comments on commit 74cf1ad

Please sign in to comment.