docs: document --output-format for cargo doc by GuTS805 · Pull Request #17325 · rust-lang/cargo · GitHub
Skip to content

docs: document --output-format for cargo doc - #17325

Merged
weihanglo merged 2 commits into
rust-lang:masterfrom
GuTS805:fix/doc-output-format-cargo-doc
Aug 8, 2026
Merged

docs: document --output-format for cargo doc#17325
weihanglo merged 2 commits into
rust-lang:masterfrom
GuTS805:fix/doc-output-format-cargo-doc

Conversation

@GuTS805

@GuTS805 GuTS805 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Closes #17323

Adds the missing --output-format documentation for cargo doc:

  • doc/man/cargo-doc.md now includes the same options-output-format snippet that cargo-rustdoc.md already has.
  • doc/book/src/reference/unstable.md's section is renamed from "output-format for rustdoc" to "output-format for rustdoc and cargo doc", with a cargo doc example added alongside the existing cargo rustdoc one.

Generated outputs (doc/man/generated_txt/cargo-doc.txt, etc/man/cargo-doc.1, doc/book/src/commands/cargo-doc.md) regenerated via cargo build-man. Docs-only change, no behavior affected.

@rustbot rustbot added A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 6, 2026
@rustbot

rustbot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Comment thread doc/book/src/reference/unstable.md Outdated

@weihanglo weihanglo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weihanglo
weihanglo enabled auto-merge August 8, 2026 00:21
@weihanglo
weihanglo added this pull request to the merge queue Aug 8, 2026
Merged via the queue into rust-lang:master with commit 21c2a90 Aug 8, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 8, 2026
@GuTS805
GuTS805 deleted the fix/doc-output-format-cargo-doc branch August 8, 2026 01:02
rust-bors Bot pushed a commit to rust-lang/rust that referenced this pull request Aug 11, 2026
Update cargo submodule

10 commits in b07e5a08651da80108eb65d7dc769ee04589f9bf..eb98b54bc9f3c74519f43d066cb3fd02ebc88df0
2026-08-07 21:51:16 +0000 to 2026-08-11 16:00:29 +0000
- feat(trim-paths): honor workspace prefix override from env (rust-lang/cargo#17349)
- fix(clean): respect target with --doc (rust-lang/cargo#17322)
- chore(renovate): Use a 3day minimum release age (rust-lang/cargo#17346)
- test: Handle non-deterministic compilation order (rust-lang/cargo#17347)
- docs(ref): Add missing config env variables (rust-lang/cargo#17345)
- fix(trim-paths): workspace remap under -Zroot-dir (rust-lang/cargo#17337)
- Fix funding link (rust-lang/cargo#17344)
- fix(trim-paths): `/cargo/deps` fallback sources  (rust-lang/cargo#17338)
- doc: don't use mergeable info and json together (rust-lang/cargo#17336)
- docs: document --output-format for cargo doc (rust-lang/cargo#17325)
@rustbot rustbot added this to the 1.99.0 milestone Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo doc --output-format=json (unstable) is undocumented

4 participants