File tree Expand file tree Collapse file tree 4 files changed +89
-0
lines changed Expand file tree Collapse file tree 4 files changed +89
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,28 @@ cargo-doc --- Build a package's documentation
16
16
Build the documentation for the local package and all dependencies. The output
17
17
is placed in ` target/doc ` in rustdoc's usual format.
18
18
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
+
40
+
19
41
## OPTIONS
20
42
21
43
### Documentation Options
Original file line number Diff line number Diff line change @@ -10,6 +10,25 @@ DESCRIPTION
10
10
Build the documentation for the local package and all dependencies. The
11
11
output is placed in target/doc in rustdoc’s usual format.
12
12
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
+
13
32
OPTIONS
14
33
Documentation Options
15
34
--open
Original file line number Diff line number Diff line change @@ -12,6 +12,28 @@ cargo-doc --- Build a package's documentation
12
12
Build the documentation for the local package and all dependencies. The output
13
13
is placed in ` target/doc ` in rustdoc's usual format.
14
14
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
+
36
+
15
37
## OPTIONS
16
38
17
39
### 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
10
10
.SH "DESCRIPTION"
11
11
Build the documentation for the local package and all dependencies. The output
12
12
is 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
13
39
.SH "OPTIONS"
14
40
.SS "Documentation Options"
15
41
.sp
You can’t perform that action at this time.
0 commit comments