Skip to content

[rustdoc] Add --output-format=doctest command-line flag#134531

Merged
bors merged 7 commits intorust-lang:masterfrom
GuillaumeGomez:extract-doctests
Jan 31, 2025
Merged

[rustdoc] Add --output-format=doctest command-line flag#134531
bors merged 7 commits intorust-lang:masterfrom
GuillaumeGomez:extract-doctests

Conversation

@GuillaumeGomez
Copy link
Copy Markdown
Member

Part of #134529.

It was discussed with the Rust-for-Linux project recently that they needed a way to extract doctests so they can modify them and then run them more easily (look for "a way to extract doctests" here).

For now, I output most of ScrapedDoctest fields in JSON format with serde_json. So it outputs the following information:

  • filename
  • line
  • langstr
  • text

cc @ojeda
r? @notriddle

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

Labels

A-run-make Area: port run-make Makefiles to rmake.rs A-rust-for-linux Relevant for the Rust-for-Linux project S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants