tldr/pages/common/cargo-rustdoc.md

34 lines
768 B
Markdown
Raw Normal View History

# cargo rustdoc
2023-10-29 08:54:53 +00:00
> Build the documentation of Rust packages.
> Similar to `cargo doc`, but you can pass options to `rustdoc`. See `rustdoc --help` for all available options.
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-rustdoc.html>.
2023-10-29 08:54:53 +00:00
- Pass options to `rustdoc`:
2023-10-29 08:54:53 +00:00
`cargo rustdoc -- {{rustdoc_options}}`
2023-10-29 08:54:53 +00:00
- Warn about a documentation lint:
2023-10-29 08:54:53 +00:00
`cargo rustdoc -- --warn rustdoc::{{lint_name}}`
- Ignore a documentation lint:
`cargo rustdoc -- --allow rustdoc::{{lint_name}}`
- Document the package's library:
`cargo rustdoc --lib`
- Document the specified binary:
`cargo rustdoc --bin {{name}}`
- Document the specified example:
`cargo rustdoc --example {{name}}`
- Document the specified integration test:
`cargo rustdoc --test {{name}}`