1
Fork 0

Rollup merge of #67875 - dtolnay:hidden, r=GuillaumeGomez

Distinguish between private items and hidden items in rustdoc

I believe rustdoc should not be conflating private items (visibility lower than `pub`) and hidden items (attribute `doc(hidden)`). This matters now that Cargo is passing --document-private-items by default for bin crates. In bin crates that rely on macros, intentionally hidden implementation details of the macros can overwhelm the actual useful internal API that one would want to document.

This PR restores the strip-hidden pass when documenting private items, and introduces a separate unstable --document-hidden-items option to skip the strip-hidden pass. The two options are orthogonal to one another.

Fixes #67851. Closes #60884.
This commit is contained in:
Yuki Okushi 2020-01-09 00:29:13 +09:00 committed by GitHub
commit 03fe834a23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 139 additions and 79 deletions

View file

@ -14,7 +14,7 @@ use crate::passes::Pass;
pub const CHECK_CODE_BLOCK_SYNTAX: Pass = Pass {
name: "check-code-block-syntax",
pass: check_code_block_syntax,
run: check_code_block_syntax,
description: "validates syntax inside Rust code blocks",
};