Skip to content

Commit 813b93e

Browse files
committed
rustdoc doctest: include signal number in exit status
Related to #95601
1 parent dd38eea commit 813b93e

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/librustdoc/doctest.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,13 +1069,7 @@ impl Tester for Collector {
10691069
}
10701070
}
10711071
TestFailure::ExecutionFailure(out) => {
1072-
let reason = if let Some(code) = out.status.code() {
1073-
format!("exit code {code}")
1074-
} else {
1075-
String::from("terminated by signal")
1076-
};
1077-
1078-
eprintln!("Test executable failed ({reason}).");
1072+
eprintln!("Test executable failed ({reason}).", reason = out.status);
10791073

10801074
// FIXME(#12309): An unfortunate side-effect of capturing the test
10811075
// executable's output is that the relative ordering between the test's

0 commit comments

Comments
 (0)