Skip to content

Commit fcc2c10

Browse files
authored
Rollup merge of rust-lang#95836 - workingjubilee:doctest-exe, r=notriddle
Use rust_out{,.exe,.wasm} for doctests This was mentioned as an issue to me by `@bruxisma.` There are 3 separate instances where "rust_out" can become part of the name of a Rust executable, so I am mostly just hoping that this fixes the problem, given that the other sites which it can slip in seem to be well-behaved.
2 parents c91d0b2 + d483220 commit fcc2c10

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/librustdoc/doctest.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,10 @@ fn run_test(
310310
let (test, line_offset, supports_color) =
311311
make_test(test, Some(crate_name), lang_string.test_harness, opts, edition, Some(test_id));
312312

313-
let output_file = outdir.path().join("rust_out");
313+
// Make sure we emit well-formed executable names for our platform.
314+
let mut output_file = outdir.path().join("rust_out");
315+
output_file.set_extension(env::consts::EXE_EXTENSION);
316+
let output_file = output_file;
314317

315318
let rustc_binary = rustdoc_options
316319
.test_builder

0 commit comments

Comments
 (0)