File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,26 @@ cargo-doc --- Build a package's documentation
11
11
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
+ ** Note:** Cargo's documentation is * cumulative* . When you run
15
+
16
+ ``` bash
17
+ cargo doc
18
+ ```
19
+
20
+ Cargo will preserve any existing HTML in ` target/doc/ ` (including your
21
+ dependencies' docs) rather than deleting it. Flags like ` --no-deps `
22
+ simply prevent * rebuilding* those pages—they will remain until you
23
+ explicitly clean them up.
24
+
25
+ ### Removing old docs
26
+
27
+ If you truly want to start fresh, you have two options:
28
+
29
+ 1 . ** ` cargo clean --doc ` **
30
+ Deletes * all* documentation (your crate + dependencies).
31
+ 2 . ** Manual deletion**
32
+ To remove only specific dependency folders (for example:
33
+ ` rm -rf target/doc/foo-0.1.0/ ` ) without nuking everything else.
14
34
15
35
## OPTIONS
16
36
You can’t perform that action at this time.
0 commit comments