diff options
| -rw-r--r-- | library/test/src/lib.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/doctest.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/library/test/src/lib.rs b/library/test/src/lib.rs index 7f56d1e3626..1190bb56b97 100644 --- a/library/test/src/lib.rs +++ b/library/test/src/lib.rs @@ -89,8 +89,8 @@ use options::RunStrategy; use test_result::*; use time::TestExecTime; -// Process exit code to be used to indicate test failures. -const ERROR_EXIT_CODE: i32 = 101; +/// Process exit code to be used to indicate test failures. +pub const ERROR_EXIT_CODE: i32 = 101; const SECONDARY_TEST_INVOKER_VAR: &str = "__RUST_TEST_INVOKE"; const SECONDARY_TEST_BENCH_BENCHMARKS_VAR: &str = "__RUST_TEST_BENCH_BENCHMARKS"; diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs index 0bef091468f..a4344c87e02 100644 --- a/src/librustdoc/doctest.rs +++ b/src/librustdoc/doctest.rs @@ -410,7 +410,7 @@ pub(crate) fn run_tests( std::mem::drop(temp_dir); times.display_times(); // libtest::ERROR_EXIT_CODE is not public but it's the same value. - std::process::exit(101); + std::process::exit(test::ERROR_EXIT_CODE); } } |
