diff options
| author | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-06-18 22:49:27 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume.gomez@huawei.com> | 2024-08-13 20:14:55 +0200 |
| commit | 0bd2c99ce8a3df2ae734748a69b4dc7644b5db1c (patch) | |
| tree | 464a3b166683d1541a272d5c01b53b88b08f5a6b | |
| parent | c5ae545fbd285cfd0aab251585c555021b6992d1 (diff) | |
| download | rust-0bd2c99ce8a3df2ae734748a69b4dc7644b5db1c.tar.gz rust-0bd2c99ce8a3df2ae734748a69b4dc7644b5db1c.zip | |
Only show rustdoc doctest compilation output if `nocapture` is used
| -rw-r--r-- | src/librustdoc/doctest.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs index 74adcb415fa..7028666371b 100644 --- a/src/librustdoc/doctest.rs +++ b/src/librustdoc/doctest.rs @@ -542,9 +542,11 @@ fn run_test( return Err(TestFailure::CompileError); } compiler.arg(input_file); - // FIXME: Remove once done fixing bugs. - // FIXME: Should this call only be done if `nocapture` is not set? - // compiler.stderr(Stdio::null()); + if !rustdoc_options.nocapture { + // If `nocapture` is disabled, then we don't display rustc's output when compiling + // the merged doctests. + compiler.stderr(Stdio::null()); + } } else { compiler.arg("-"); compiler.stdin(Stdio::piped()); |
