Skip to content

Commit ef56675

Browse files
Use libtest ERROR_EXIT_CODE constant
1 parent 6e61a1c commit ef56675

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustdoc/doctest.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,7 @@ fn run_test(
836836
match result {
837837
Err(e) => return (duration, Err(TestFailure::ExecutionError(e))),
838838
Ok(out) => {
839-
// FIXME: use test::ERROR_EXIT_CODE once public
840-
if langstr.should_panic && out.status.code() != Some(101) {
839+
if langstr.should_panic && out.status.code() != Some(test::ERROR_EXIT_CODE) {
841840
return (duration, Err(TestFailure::UnexpectedRunPass));
842841
} else if !langstr.should_panic && !out.status.success() {
843842
return (duration, Err(TestFailure::ExecutionFailure(out)));

0 commit comments

Comments
 (0)