Skip to content

Commit 2e4a30a

Browse files
authored
Unrolled build for #144297
Rollup merge of #144297 - GuillaumeGomez:ERROR_EXIT_CODE, r=Amanieu Make `libtest::ERROR_EXIT_CODE` const public to not redefine it in rustdoc I think it's better to make this constant public so it can be used by crates using `libtest` as dependency. As a side-note, I will update #143900 to make use of this constant once this is current PR is merged.
2 parents 64ca23b + bee5fbf commit 2e4a30a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

library/test/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ use options::RunStrategy;
8989
use test_result::*;
9090
use time::TestExecTime;
9191

92-
// Process exit code to be used to indicate test failures.
93-
const ERROR_EXIT_CODE: i32 = 101;
92+
/// Process exit code to be used to indicate test failures.
93+
pub const ERROR_EXIT_CODE: i32 = 101;
9494

9595
const SECONDARY_TEST_INVOKER_VAR: &str = "__RUST_TEST_INVOKE";
9696
const SECONDARY_TEST_BENCH_BENCHMARKS_VAR: &str = "__RUST_TEST_BENCH_BENCHMARKS";

src/librustdoc/doctest.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,8 @@ pub(crate) fn run_tests(
409409
// We ensure temp dir destructor is called.
410410
std::mem::drop(temp_dir);
411411
times.display_times();
412-
// libtest::ERROR_EXIT_CODE is not public but it's the same value.
412+
// FIXME(GuillaumeGomez): Uncomment the next line once #144297 has been merged.
413+
// std::process::exit(test::ERROR_EXIT_CODE);
413414
std::process::exit(101);
414415
}
415416
}

0 commit comments

Comments
 (0)