Skip to content

Commit a8c6c92

Browse files
committed
Fix DESCRIPTION
1 parent 840b83a commit a8c6c92

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/doc/src/commands/cargo-doc.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,26 @@ cargo-doc --- Build a package's documentation
1111

1212
Build the documentation for the local package and all dependencies. The output
1313
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.
1434

1535
## OPTIONS
1636

0 commit comments

Comments
 (0)