diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2024-04-04 21:16:56 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-04 21:16:56 -0400 |
| commit | 50603cbb6d019789e5838a0ff720102c38a5ee58 (patch) | |
| tree | 1ec2fd19f637d78eceba6c49b7ee9c3022b827bf /src/doc | |
| parent | ac298726afbb2719c966153539b4229da6c8b8b6 (diff) | |
| parent | 612acf8397f0f8d55fc533d61ea835b73a1e696d (diff) | |
Rollup merge of #123417 - harryhanYuhao:master, r=GuillaumeGomez
Add Description for cargo in rustdoc documentation As most people use cargo now, I prioritised the description for cargo in rustdoc documentation. I also added how to open the generated doc with cargo. Btw, may I ask how to use `./x tidy`? It says `warning: `tidy` is not installed;`
Diffstat (limited to 'src/doc')
| -rw-r--r-- | src/doc/rustdoc/src/what-is-rustdoc.md | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/doc/rustdoc/src/what-is-rustdoc.md b/src/doc/rustdoc/src/what-is-rustdoc.md index 7179ee0cf03..cb4ec51caf2 100644 --- a/src/doc/rustdoc/src/what-is-rustdoc.md +++ b/src/doc/rustdoc/src/what-is-rustdoc.md @@ -34,6 +34,9 @@ the main page is located in `doc/lib/index.html`. If you open that up in a web browser, you will see a page with a search bar, and "Crate lib" at the top, with no contents. +You can also use `cargo doc` to generate documentation for the whole project. +See [Using rustdoc with Cargo](#using-rustdoc-with-cargo). + ## Configuring rustdoc There are two problems with this: first, why does it @@ -79,7 +82,13 @@ docs. Instead of the `rustdoc` command, we could have done this: $ cargo doc ``` -Internally, this calls out to `rustdoc` like this: +If you want `cargo` to automatically open the generated documentation, you can use: + +```bash +$ cargo doc --open +``` + +Internally, `cargo doc` calls out to `rustdoc` like this: ```bash $ rustdoc --crate-name docs src/lib.rs -o <path>/docs/target/doc -L |
