Skip to content

Commit 0bd2c99

Browse files
Only show rustdoc doctest compilation output if nocapture is used
1 parent c5ae545 commit 0bd2c99

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/librustdoc/doctest.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,11 @@ fn run_test(
542542
return Err(TestFailure::CompileError);
543543
}
544544
compiler.arg(input_file);
545-
// FIXME: Remove once done fixing bugs.
546-
// FIXME: Should this call only be done if `nocapture` is not set?
547-
// compiler.stderr(Stdio::null());
545+
if !rustdoc_options.nocapture {
546+
// If `nocapture` is disabled, then we don't display rustc's output when compiling
547+
// the merged doctests.
548+
compiler.stderr(Stdio::null());
549+
}
548550
} else {
549551
compiler.arg("-");
550552
compiler.stdin(Stdio::piped());

0 commit comments

Comments
 (0)