From 360f8f8b7d0675ad74973071fea29568f79ef742 Mon Sep 17 00:00:00 2001 From: Alexis Bourget Date: Tue, 2 Feb 2021 21:18:46 +0100 Subject: [PATCH] Make rustdoc respect `--error-format short` The other two (`human` and `json`) are already handled. --- src/librustdoc/doctest.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs index 30ff124dac6..eecfd337cdf 100644 --- a/src/librustdoc/doctest.rs +++ b/src/librustdoc/doctest.rs @@ -296,7 +296,12 @@ fn run_test( } }); if let ErrorOutputType::HumanReadable(kind) = options.error_format { - let (_, color_config) = kind.unzip(); + let (short, color_config) = kind.unzip(); + + if short { + compiler.arg("--error-format").arg("short"); + } + match color_config { ColorConfig::Never => { compiler.arg("--color").arg("never"); -- 2.44.0