Skip to content

Commit 465c2af

Browse files
committed
Regenerate man pages after documenting cumulative --no-deps behavior
1 parent b4c7aca commit 465c2af

File tree

3 files changed

+32
-12
lines changed

3 files changed

+32
-12
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ OPTIONS
2222
--no-deps
2323
Do not build documentation for dependencies.
2424

25+
Note: Documentation is cumulative. If you’ve already run cargo doc
26+
(including dependency docs), and later run cargo doc --no-deps,
27+
Cargo will skip deleting or rebuilding those old dependency docs. To
28+
remove them, you can either:
29+
30+
1. Run cargo clean --doc before cargo doc --no-deps, or
31+
32+
2. Manually delete the unwanted folders under target/doc/.
33+
2534
--document-private-items
2635
Include non-public items in the documentation. This will be enabled
2736
by default if documenting a binary target.

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

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,16 @@ option.</dd>
2626

2727

2828
<dt class="option-term" id="option-cargo-doc---no-deps"><a class="option-anchor" href="#option-cargo-doc---no-deps"></a><code>--no-deps</code></dt>
29-
<dd class="option-desc">
30-
Do not build documentation for dependencies.
31-
32-
<p><strong>Note:</strong> Cargo keeps docs cumulatively. If you’ve already run
33-
<code>cargo doc</code> (which generated dependency docs), then later run
34-
<code>cargo doc --no-deps</code>, Cargo will skip rebuilding (and won’t delete)
35-
those existing docs. To truly remove old dependency docs, either:
36-
37-
1. Run <code>cargo clean --doc</code> before <code>cargo doc --no-deps</code>, or
38-
2. Manually delete the unwanted folders under <code>target/doc/</code>.
39-
</p>
40-
</dd>
29+
<dd class="option-desc">Do not build documentation for dependencies.</p>
30+
<p><strong>Note:</strong> Documentation is <em>cumulative</em>. If you’ve already run
31+
<code>cargo doc</code> (including dependency docs), and later run
32+
<code>cargo doc --no-deps</code>, Cargo will skip deleting or rebuilding those
33+
old dependency docs. To remove them, you can either:</p>
34+
<ol>
35+
<li>Run <code>cargo clean --doc</code> before <code>cargo doc --no-deps</code>, or</li>
36+
<li>Manually delete the unwanted folders under <code>target/doc/</code>.</li>
37+
</ol></dd>
38+
4139

4240
<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>
4341
<dd class="option-desc">Include non-public items in the documentation. This will be enabled by default if documenting a binary target.</dd>

src/etc/man/cargo-doc.1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ option.
2424
\fB\-\-no\-deps\fR
2525
.RS 4
2626
Do not build documentation for dependencies.
27+
.sp
28+
\fBNote:\fR Documentation is \fIcumulative\fR\&. If you\[cq]ve already run
29+
\fBcargo doc\fR (including dependency docs), and later run
30+
\fBcargo doc \-\-no\-deps\fR, Cargo will skip deleting or rebuilding those
31+
old dependency docs. To remove them, you can either:
32+
.sp
33+
.RS 4
34+
\h'-04' 1.\h'+01'Run \fBcargo clean \-\-doc\fR before \fBcargo doc \-\-no\-deps\fR, or
35+
.RE
36+
.sp
37+
.RS 4
38+
\h'-04' 2.\h'+01'Manually delete the unwanted folders under \fBtarget/doc/\fR\&.
39+
.RE
2740
.RE
2841
.sp
2942
\fB\-\-document\-private\-items\fR

0 commit comments

Comments
 (0)