File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-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
You can’t perform that action at this time.
0 commit comments