Only show rustdoc doctest compilation output if nocapture is used

This commit is contained in:
Guillaume Gomez 2024-06-18 22:49:27 +02:00
parent c5ae545fbd
commit 0bd2c99ce8

View File

@ -542,9 +542,11 @@ fn run_test(
return Err(TestFailure::CompileError); return Err(TestFailure::CompileError);
} }
compiler.arg(input_file); compiler.arg(input_file);
// FIXME: Remove once done fixing bugs. if !rustdoc_options.nocapture {
// FIXME: Should this call only be done if `nocapture` is not set? // If `nocapture` is disabled, then we don't display rustc's output when compiling
// compiler.stderr(Stdio::null()); // the merged doctests.
compiler.stderr(Stdio::null());
}
} else { } else {
compiler.arg("-"); compiler.arg("-");
compiler.stdin(Stdio::piped()); compiler.stdin(Stdio::piped());