Skip to content

Commit 330f1de

Browse files
committed
Fix DESCRIPTION formatting, regenerate docs
1 parent 840b83a commit 330f1de

File tree

4 files changed

+39
-1
lines changed

4 files changed

+39
-1
lines changed

src/doc/man/cargo-doc.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ option.
3131

3232
{{#option "`--no-deps`" }}
3333
Do not build documentation for dependencies.
34+
35+
**Note:** Documentation is _cumulative_. If you’ve already run
36+
`cargo doc` (including dependency docs), and later run
37+
`cargo doc --no-deps`, Cargo will skip deleting or rebuilding those
38+
old dependency docs. To remove them, you can either:
39+
40+
1. Run `cargo clean --doc` before `cargo doc --no-deps`, or
41+
2. Manually delete the unwanted folders under `target/doc/`.
3442
{{/option}}
3543

3644
{{#option "`--document-private-items`" }}

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: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ 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">Do not build documentation for dependencies.</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>
3038

3139

3240
<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>

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)