From: Alexis Bourget Date: Tue, 2 Feb 2021 20:18:46 +0000 (+0100) Subject: Make rustdoc respect `--error-format short` X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=360f8f8b7d0675ad74973071fea29568f79ef742;p=rust.git Make rustdoc respect `--error-format short` The other two (`human` and `json`) are already handled. --- 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");