Skip to content

Commit c3a16b3

Browse files
committed
Auto merge of #9565 - KubaP:doc-fix, r=ehuss
Add mising documentation regarding `cargo doc` It seems that the `--document-private-items` flag for `cargo doc` is automatically set when documenting a binary target. This change mentions that in the doc page. The documentation did not mention this before, and it got me confused whilst I was trying to track down something going wrong.
2 parents da2c770 + c37a6e3 commit c3a16b3

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/doc/man/cargo-doc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Do not build documentation for dependencies.
3232
{{/option}}
3333

3434
{{#option "`--document-private-items`" }}
35-
Include non-public items in the documentation.
35+
Include non-public items in the documentation. This will be enabled by default if documenting a binary target.
3636
{{/option}}
3737

3838
{{/options}}

src/doc/man/generated_txt/cargo-doc.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ OPTIONS
2323
Do not build documentation for dependencies.
2424

2525
--document-private-items
26-
Include non-public items in the documentation.
26+
Include non-public items in the documentation. This will be enabled
27+
by default if documenting a binary target.
2728

2829
Package Selection
2930
By default, when no package selection options are given, the packages

src/doc/src/commands/cargo-doc.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ option.</dd>
3232

3333

3434
<dt class="option-term" id="option-cargo-doc---document-private-items"><a class="option-anchor" href="#option-cargo-doc---document-private-items"></a><code>--document-private-items</code></dt>
35-
<dd class="option-desc">Include non-public items in the documentation.</dd>
35+
<dd class="option-desc">Include non-public items in the documentation. This will be enabled by default if documenting a binary target.</dd>
3636

3737

3838
</dl>

src/etc/man/cargo-doc.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Do not build documentation for dependencies.
2828
.sp
2929
\fB\-\-document\-private\-items\fR
3030
.RS 4
31-
Include non\-public items in the documentation.
31+
Include non\-public items in the documentation. This will be enabled by default if documenting a binary target.
3232
.RE
3333
.SS "Package Selection"
3434
By default, when no package selection options are given, the packages selected

0 commit comments

Comments
 (0)