File tree Expand file tree Collapse file tree 4 files changed +87
-0
lines changed Expand file tree Collapse file tree 4 files changed +87
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,27 @@ cargo-doc --- Build a package's documentation
1616Build the documentation for the local package and all dependencies. The output
1717is placed in ` target/doc ` in rustdoc's usual format.
1818
19+ ** Note:** Cargo's documentation is * cumulative* . When you run
20+
21+ ``` bash
22+ cargo doc
23+ ```
24+
25+ Cargo will preserve any existing HTML in ` target/doc/ ` (including your
26+ dependencies' docs) rather than deleting it. Flags like ` --no-deps `
27+ simply prevent * rebuilding* those pages—they will remain until you
28+ explicitly clean them up.
29+
30+ ### Removing old docs
31+
32+ If you truly want to start fresh, you have two options:
33+
34+ 1 . ** ` cargo clean --doc ` **
35+ Deletes * all* documentation (your crate + dependencies).
36+ 2 . ** Manual deletion**
37+ To remove only specific dependency folders (for example:
38+ ` rm -rf target/doc/foo-0.1.0/ ` ) without nuking everything else.
39+
1940## OPTIONS
2041
2142### Documentation Options
Original file line number Diff line number Diff line change @@ -10,6 +10,25 @@ DESCRIPTION
1010 Build the documentation for the local package and all dependencies. The
1111 output is placed in target/doc in rustdoc’s usual format.
1212
13+ Note: Cargo’s documentation is cumulative. When you run
14+
15+ cargo doc
16+
17+ Cargo will preserve any existing HTML in target/doc/ (including your
18+ dependencies’ docs) rather than deleting it. Flags like --no-deps
19+ simply prevent rebuilding those pages—they will remain until you
20+ explicitly clean them up.
21+
22+ Removing old docs
23+ If you truly want to start fresh, you have two options:
24+
25+ 1. cargo clean --doc Deletes all documentation (your crate +
26+ dependencies).
27+
28+ 2. Manual deletion To remove only specific dependency folders (for
29+ example: rm -rf target/doc/foo-0.1.0/) without nuking everything
30+ else.
31+
1332OPTIONS
1433 Documentation Options
1534 --open
Original file line number Diff line number Diff line change @@ -12,6 +12,27 @@ cargo-doc --- Build a package's documentation
1212Build the documentation for the local package and all dependencies. The output
1313is placed in ` target/doc ` in rustdoc's usual format.
1414
15+ ** Note:** Cargo's documentation is * cumulative* . When you run
16+
17+ ``` bash
18+ cargo doc
19+ ```
20+
21+ Cargo will preserve any existing HTML in ` target/doc/ ` (including your
22+ dependencies' docs) rather than deleting it. Flags like ` --no-deps `
23+ simply prevent * rebuilding* those pages—they will remain until you
24+ explicitly clean them up.
25+
26+ ### Removing old docs
27+
28+ If you truly want to start fresh, you have two options:
29+
30+ 1 . ** ` cargo clean --doc ` **
31+ Deletes * all* documentation (your crate + dependencies).
32+ 2 . ** Manual deletion**
33+ To remove only specific dependency folders (for example:
34+ ` rm -rf target/doc/foo-0.1.0/ ` ) without nuking everything else.
35+
1536## OPTIONS
1637
1738### Documentation Options
Original file line number Diff line number Diff line change @@ -10,6 +10,32 @@ cargo\-doc \[em] Build a package\[cq]s documentation
1010.SH "DESCRIPTION"
1111Build the documentation for the local package and all dependencies. The output
1212is placed in \fB target/doc \fR in rustdoc\[cq ] s usual format.
13+ .sp
14+ \fB Note: \fR Cargo\[cq ] s documentation is \fI cumulative \fR \& . When you run
15+ .sp
16+ .RS 4
17+ .nf
18+ cargo doc
19+ .fi
20+ .RE
21+ .sp
22+ Cargo will preserve any existing HTML in \fB target/doc/ \fR (including your
23+ dependencies\[cq ] docs) rather than deleting it. Flags like \fB \-\- no \- deps \fR
24+ simply prevent \fI rebuilding \fR those pages\[em ] they will remain until you
25+ explicitly clean them up.
26+ .SS "Removing old docs"
27+ If you truly want to start fresh, you have two options:
28+ .sp
29+ .RS 4
30+ \h '-04' 1.\h '+01' \fB\fB cargo clean \-\- doc \fB\fR
31+ Deletes \fI all \fR documentation (your crate + dependencies).
32+ .RE
33+ .sp
34+ .RS 4
35+ \h '-04' 2.\h '+01' \fB Manual deletion \fR
36+ To remove only specific dependency folders (for example:
37+ \fB rm \- rf target/doc/foo \- 0.1.0/ \fR ) without nuking everything else.
38+ .RE
1339.SH "OPTIONS"
1440.SS "Documentation Options"
1541.sp
You can’t perform that action at this time.
0 commit comments