Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

rustdoc-book: Clean up section on --output-format #136405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
rustdoc-book: Clean up section on --output-format
  • Loading branch information
aDotInTheVoid committed Feb 1, 2025
commit f5d5210d26d29faad12c6aa7ef55aefa8d9f6ce9
16 changes: 11 additions & 5 deletions 16 src/doc/rustdoc/src/unstable-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ the source.

## `--show-type-layout`: add a section to each type's docs describing its memory layout

* Tracking issue: [#113248](https://github.com/rust-lang/rust/issues/113248)
* Tracking issue: [#113248](https://github.com/rust-lang/rust/issues/113248)

Using this flag looks like this:

Expand Down Expand Up @@ -526,9 +526,10 @@ use `-o -`.

### json

* Tracking Issue: [#76578](https://github.com/rust-lang/rust/issues/76578)

`--output-format json` emits documentation in the experimental
[JSON format](https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types/). `--output-format html` has no effect,
and is also accepted on stable toolchains.
[JSON format](https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc_json_types/).

JSON Output for toolchain crates (`std`, `alloc`, `core`, `test`, and `proc_macro`)
is available via the `rust-docs-json` rustup component.
Expand All @@ -546,11 +547,11 @@ information.

### doctest

* Tracking issue: [#134529](https://github.com/rust-lang/rust/issues/134529)

`--output-format doctest` emits JSON on stdout which gives you information about doctests in the
provided crate.

Tracking issue: [#134529](https://github.com/rust-lang/rust/issues/134529)

You can use this option like this:

```bash
Expand Down Expand Up @@ -606,6 +607,11 @@ The generated output (formatted) will look like this:
* `doctest_code` is the code modified by rustdoc that will be run. If there is a fatal syntax error, this field will not be present.
* `name` is the name generated by rustdoc which represents this doctest.

### html

`--output-format html` has no effect, as the default output is HTML. This is
accepted on stable, even though the other options for this flag aren't.

## `--enable-per-target-ignores`: allow `ignore-foo` style filters for doctests

* Tracking issue: [#64245](https://github.com/rust-lang/rust/issues/64245)
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.