rustdoc doctest: include signal number in exit status

Related to #95601
This commit is contained in:
Michael Howell 2022-04-07 11:16:13 -07:00
parent dd38eea722
commit 813b93efb0

View file

@ -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