Skip to content

Commit 54fd66a

Browse files
committed
Auto merge of #13284 - charmitro:output-format-doc-entry, r=weihanglo
Add documentation entry for unstable `--output-format` flag This is a follow-up to #12252 adding a documentation entry for the newly supported unstable flag `--output-format`.
2 parents 2697837 + 40aa8b1 commit 54fd66a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/doc/src/reference/unstable.md

+12
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ For the latest nightly, see the [nightly version] of this page.
8989
* rustdoc
9090
* [rustdoc-map](#rustdoc-map) --- Provides mappings for documentation to link to external sites like [docs.rs](https://docs.rs/).
9191
* [scrape-examples](#scrape-examples) --- Shows examples within documentation.
92+
* [output-format](#output-format-for-rustdoc) --- Allows documentation to also be emitted in the experimental [JSON format](https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types/).
9293
* `Cargo.toml` extensions
9394
* [Profile `rustflags` option](#profile-rustflags-option) --- Passed directly to rustc.
9495
* [codegen-backend](#codegen-backend) --- Select the codegen backend used by rustc.
@@ -1079,6 +1080,17 @@ If you want examples to be scraped from example targets, then you must not satis
10791080
For example, you can set `doc-scrape-examples` to true for one example target, and that signals to Cargo that
10801081
you are ok with dev-deps being build for `cargo doc`.
10811082

1083+
## output-format for rustdoc
1084+
1085+
* Tracking Issue: [#13283](https://github.com/rust-lang/cargo/issues/13283)
1086+
1087+
This flag determines the output format of `cargo rustdoc`, accepting `html` or `json`, providing tools with a way to lean on [rustdoc's experimental JSON format](https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types/).
1088+
1089+
You can use the flag like this:
1090+
1091+
```
1092+
cargo rustdoc -Z unstable-options --output-format json
1093+
```
10821094

10831095
## check-cfg
10841096

0 commit comments

Comments
 (0)