File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -420,4 +420,12 @@ renamed with `--resource-suffix` will load from the given path.
420420
421421### ` --persist-doctests ` : persist doctest executables after running
422422
423- This feature allows the persistence of the doctest executables to the specified path.
423+ Using this flag looks like this:
424+
425+ ``` bash
426+ $ rustdoc src/lib.rs --test -Z unstable-options --persist-doctests target/rustdoctest
427+ ```
428+
429+ This flag allows you to keep doctest executables around after they're compiled or run.
430+ Usually, rustdoc will immediately discard a compiled doctest after it's been tested, but
431+ with this option, you can keep those binaries around for farther testing.
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ error[E0425]: cannot find value `no` in this scope
12123 | no
1313 | ^^ not found in this scope
1414
15- thread '$DIR/failed-doctest-output.rs - OtherStruct (line 27 )' panicked at 'couldn't compile the test', src/librustdoc/test.rs:361 :13
15+ thread '$DIR/failed-doctest-output.rs - OtherStruct (line 17 )' panicked at 'couldn't compile the test', src/librustdoc/test.rs:354 :13
1616note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
1717
1818---- $DIR/failed-doctest-output.rs - SomeStruct (line 11) stdout ----
@@ -21,7 +21,7 @@ thread '$DIR/failed-doctest-output.rs - SomeStruct (line 11)' panicked at 'test
2121thread 'main' panicked at 'oh no', $DIR/failed-doctest-output.rs:3:1
2222note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2323
24- ', src/librustdoc/test.rs:396 :17
24+ ', src/librustdoc/test.rs:389 :17
2525
2626
2727failures:
You can’t perform that action at this time.
0 commit comments