]> git.lizzy.rs Git - rust.git/commit
Auto merge of #56189 - rep-nop:keep_doc_test_executable, r=QuietMisdreavus
authorbors <bors@rust-lang.org>
Fri, 18 Jan 2019 16:18:11 +0000 (16:18 +0000)
committerbors <bors@rust-lang.org>
Fri, 18 Jan 2019 16:18:11 +0000 (16:18 +0000)
commitf613dc138b4012cf3d2eb40718fbcc7cf0a34039
treed77b35ab334deed793d6a03083ddda21d1ecd9bc
parent527b8d424392dd7d89cfaa4dfdaec4df226c8018
parentf5413cd1e232837775bd8dfc803af4429e8c89c4
Auto merge of #56189 - rep-nop:keep_doc_test_executable, r=QuietMisdreavus

rustdoc: Add option to persist doc test executables

Fixes #37048.

This is the initial version of the code so the doctest executables can be used for stuff like code coverage (specifically https://github.com/xd009642/tarpaulin/issues/13) the folders it goes into were just a first idea, so any better ones are welcome.

Right now it creates a directory structure like:
```
  given_path/
          |_____ <filename>_rs_<linenum>/
          |_____ ...
          |_____ <filename>_rs_<linenum>/
                 |_____ rust_out

```
I couldn't figure out where it actually outputs the file w/ the name, I suspect its somewhere deeper in the compiler.

It also adds the unstable `--persist-doctests` flag to `rustdoc` that enables this behavior.