Make libtest::ERROR_EXIT_CODE const public to not redefine it in rustdoc

This commit is contained in:
Guillaume Gomez 2025-07-22 12:03:15 +02:00
parent 32e7a4b92b
commit 227abb70ab
2 changed files with 3 additions and 3 deletions

View file

@ -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";

View file

@ -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);
}
}