File tree 3 files changed +33
-1
lines changed
test/run-make-fulldeps/doctests-keep-binaries
3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -361,7 +361,7 @@ fn run_test(
361
361
for debugging_option_str in & options. debugging_opts_strs {
362
362
compiler. arg ( "-Z" ) . arg ( & debugging_option_str) ;
363
363
}
364
- if no_run && !compile_fail {
364
+ if no_run && !compile_fail && options . persist_doctests . is_none ( ) {
365
365
compiler. arg ( "--emit=metadata" ) ;
366
366
}
367
367
compiler. arg ( "--target" ) . arg ( match target {
Original file line number Diff line number Diff line change
1
+ include ../../run-make-fulldeps/tools.mk
2
+
3
+ # Check that valid binaries are persisted by running them, regardless of whether the --run or --no-run option is used.
4
+
5
+ all : run no_run
6
+
7
+ run :
8
+ mkdir -p $(TMPDIR ) /doctests
9
+ $(RUSTC ) --crate-type rlib t.rs
10
+ $(RUSTDOC ) -Zunstable-options --test --persist-doctests $(TMPDIR ) /doctests --extern t=$(TMPDIR ) /libt.rlib t.rs
11
+ $(TMPDIR ) /doctests/t_rs_2_0/rust_out
12
+ $(TMPDIR ) /doctests/t_rs_8_0/rust_out
13
+ rm -rf $(TMPDIR ) /doctests
14
+
15
+ no_run :
16
+ mkdir -p $(TMPDIR ) /doctests
17
+ $(RUSTC ) --crate-type rlib t.rs
18
+ $(RUSTDOC ) -Zunstable-options --test --persist-doctests $(TMPDIR ) /doctests --extern t=$(TMPDIR ) /libt.rlib t.rs --no-run
19
+ $(TMPDIR ) /doctests/t_rs_2_0/rust_out
20
+ $(TMPDIR ) /doctests/t_rs_8_0/rust_out
21
+ rm -rf $(TMPDIR ) /doctests
Original file line number Diff line number Diff line change
1
+ /// Fungle the foople.
2
+ /// ```
3
+ /// t::foople();
4
+ /// ```
5
+ pub fn foople ( ) { }
6
+
7
+ /// Flomble the florp
8
+ /// ```
9
+ /// t::florp();
10
+ /// ```
11
+ pub fn florp ( ) { }
You can’t perform that action at this time.
0 commit comments