Skip to content

Commit 8d74b2b

Browse files
committed
Fix DESCRIPTION
1 parent 840b83a commit 8d74b2b

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/doc/man/cargo-doc.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,28 @@ cargo-doc --- Build a package's documentation
1616
Build the documentation for the local package and all dependencies. The output
1717
is 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+
40+
1941
## OPTIONS
2042

2143
### Documentation Options

0 commit comments

Comments
 (0)