Skip to content

Commit 3aa91a2

Browse files
Use rust_out.exe for doctests on Windows
1 parent dd38eea commit 3aa91a2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/librustdoc/doctest.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,12 @@ 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+
#[cfg(windows)]
315+
let out_name = "rust_out.exe";
316+
#[cfg(not(windows))]
317+
let out_name = "rust_out";
318+
let output_file = outdir.path().join(out_name);
314319

315320
let rustc_binary = rustdoc_options
316321
.test_builder

0 commit comments

Comments
 (0)