commands.sh

cargo rustdoc

all

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 info →

Examples (7)

Pass options to `rustdoc`

cargo rustdoc -- rustdoc_options

Warn about a documentation lint

cargo rustdoc -- --warn rustdoc::lint_name

Ignore a documentation lint

cargo rustdoc -- --allow rustdoc::lint_name

Document the package's library

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
made by @shridhargupta | data from tldr-pages