]> git.lizzy.rs Git - rust.git/commitdiff
Make rustdoc respect `--error-format short`
authorAlexis Bourget <alexis.bourget@gmail.com>
Tue, 2 Feb 2021 20:18:46 +0000 (21:18 +0100)
committerAlexis Bourget <alexis.bourget@gmail.com>
Tue, 2 Feb 2021 21:03:28 +0000 (22:03 +0100)
The other two (`human` and `json`) are already handled.

src/librustdoc/doctest.rs

index 30ff124dac60fb754e3a74d1b23047e3a924de95..eecfd337cdf845027b08c59c5e51e2063527fc6e 100644 (file)
@@ -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");