Make rustdoc respect --error-format short

The other two (`human` and `json`) are already handled.
This commit is contained in:
Alexis Bourget 2021-02-02 21:18:46 +01:00
parent b81f5811f9
commit 360f8f8b7d

View file

@ -296,7 +296,12 @@ fn run_test(
} }
}); });
if let ErrorOutputType::HumanReadable(kind) = options.error_format { 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 { match color_config {
ColorConfig::Never => { ColorConfig::Never => {
compiler.arg("--color").arg("never"); compiler.arg("--color").arg("never");