Skip to content

Commit 4be8136

Browse files
committed
move --document-hidden-items to unstable opts section and reword
1 parent ac2bf91 commit 4be8136

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

src/doc/rustdoc/src/command-line-arguments.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,6 @@ mod private { // this item is private and will not be documented
102102

103103
`--document-private-items` causes all items to be documented as if they were `pub`.
104104

105-
## `--document-hidden-items`: Show items that are `#[doc(hidden)]`
106-
107-
By default, `rustdoc` does not document items that are annotated with
108-
[`#[doc(hidden)]`](write-documentation/the-doc-attribute.html#hidden).
109-
110-
`--document-hidden-items` causes all items to be documented as if they did not have `#[doc(hidden)]`.
111-
112-
items that are hidden and private will only be documented if both `--document-hidden-items` *and* `--document-private-items` are specified.
113-
114105
## `-L`/`--library-path`: where to look for dependencies
115106

116107
Using this flag looks like this:

src/doc/rustdoc/src/unstable-features.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,16 @@ themselves marked as unstable. To use any of these options, pass `-Z unstable-op
258258
the flag in question to Rustdoc on the command-line. To do this from Cargo, you can either use the
259259
`RUSTDOCFLAGS` environment variable or the `cargo rustdoc` command.
260260

261+
### `--document-hidden-items`: Show items that are `#[doc(hidden)]`
262+
<span id="document-hidden-items"></span>
263+
264+
By default, `rustdoc` does not document items that are annotated with
265+
[`#[doc(hidden)]`](write-documentation/the-doc-attribute.html#hidden).
266+
267+
`--document-hidden-items` causes all items to be documented as if they did not have `#[doc(hidden)]`.
268+
269+
Items that are hidden and private will only be documented if both `--document-hidden-items` *and* `--document-private-items` are specified.
270+
261271
### `--markdown-before-content`: include rendered Markdown before the content
262272

263273
* Tracking issue: [#44027](https://github.com/rust-lang/rust/issues/44027)

src/doc/rustdoc/src/write-documentation/the-doc-attribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ If you want to know more about inlining rules, take a look at the
231231
<span id="dochidden"></span>
232232

233233
Any item annotated with `#[doc(hidden)]` will not appear in the documentation,
234-
unless the `--document-hidden-items` flag is used.
234+
unless the [`--document-hidden-items`](unstable-features.md#document-hidden-items) flag is used.
235235
Re-exported items where one of its ancestors has
236236
`#[doc(hidden)]` will be considered hidden.
237237

0 commit comments

Comments
 (0)