Skip to content

Conversation

aDotInTheVoid
Copy link
Member

Spun out of #142642

In the future, I want the rustdoc-json test suite to invoke rustdoc twice, once with --output-format=json, and once with the (not yet implemented) --output-format=postcard flag.

Doing that requires being able to explicitly tell the .document() function which format to use, rather then implicitly using json in the rustdoc-json suite, and HTML in all others.

r? @jieyouxu

CC @jalil-salame

Spun out of https://www.github.com/rust-lang/rust/pull/142642

In the future, I want the rustdoc-json test suite to invoke rustdoc
twice, once with `--output-format=json`, and once with the (not yet
implemented) `--output-format=postcard` flag.

Doing that requires being able to explicitly tell the `.document()`
function which format to use, rather then implicitly using json in the
rustdoc-json suite, and HTML in all others.
@rustbot
Copy link
Collaborator

rustbot commented Oct 22, 2025

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Oct 22, 2025
@aDotInTheVoid aDotInTheVoid added the A-rustdoc-json Area: Rustdoc JSON backend label Oct 22, 2025
kind: DocKind,
) -> ProcRes {
if self.props.build_aux_docs {
assert_eq!(kind, DocKind::Html, "build-aux-docs doesn't make sense for rustdoc json");
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
Since the plan is to add postcard wouldn't it make sense to invert the statement? build-aux-docs only makes sense for rustdoc HTML, this way the message is still valid after postcard is introduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants