From 813b93efb0bdcb38ec6a90b74e21af43b77179a5 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Thu, 7 Apr 2022 11:16:13 -0700 Subject: [PATCH] rustdoc doctest: include signal number in exit status Related to #95601 --- src/librustdoc/doctest.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs index 50ae22b99cdf..eabe0803b499 100644 --- a/src/librustdoc/doctest.rs +++ b/src/librustdoc/doctest.rs @@ -1069,13 +1069,7 @@ impl Tester for Collector { } } TestFailure::ExecutionFailure(out) => { - let reason = if let Some(code) = out.status.code() { - format!("exit code {code}") - } else { - String::from("terminated by signal") - }; - - eprintln!("Test executable failed ({reason})."); + eprintln!("Test executable failed ({reason}).", reason = out.status); // FIXME(#12309): An unfortunate side-effect of capturing the test // executable's output is that the relative ordering between the test's