Skip to content

Commit

Permalink
Rollup merge of #134531 - GuillaumeGomez:extract-doctests, r=notriddl…
Browse files Browse the repository at this point in the history
…e,aDotInTheVoid

[rustdoc] Add `--extract-doctests` command-line flag

Part of rust-lang/rust#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](Rust-for-Linux/linux#2)).

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 branch information
matthiaskrgr authored Jan 31, 2025
2 parents a16fef4 + b55dbd5 commit bc18ada
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit bc18ada

Please sign in to comment.