about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/test/src/lib.rs4
-rw-r--r--src/librustdoc/doctest.rs3
2 files changed, 4 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..35ace656638 100644
--- a/src/librustdoc/doctest.rs
+++ b/src/librustdoc/doctest.rs
@@ -409,7 +409,8 @@ pub(crate) fn run_tests(
         // We ensure temp dir destructor is called.
         std::mem::drop(temp_dir);
         times.display_times();
-        // libtest::ERROR_EXIT_CODE is not public but it's the same value.
+        // FIXME(GuillaumeGomez): Uncomment the next line once #144297 has been merged.
+        // std::process::exit(test::ERROR_EXIT_CODE);
         std::process::exit(101);
     }
 }