Skip to content

Commit 90fecc7

Browse files
committed
Fix O(tests) stack usage in edition 2024 mergeable doctests
1 parent ed897d5 commit 90fecc7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustdoc/doctest/runner.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ mod __doctest_mod {{
136136
137137
#[rustc_main]
138138
fn main() -> std::process::ExitCode {{
139-
const TESTS: [test::TestDescAndFn; {nb_tests}] = [{ids}];
139+
const TESTS: &[test::TestDescAndFn] = &[{ids}];
140140
let test_marker = std::ffi::OsStr::new(__doctest_mod::RUN_OPTION);
141141
let test_args = &[{test_args}];
142142
const ENV_BIN: &'static str = \"RUSTDOC_DOCTEST_BIN_PATH\";
@@ -160,7 +160,6 @@ eprintln!(\"WARNING: No rustdoc doctest environment variable provided so doctest
160160
the same process\");
161161
std::process::Termination::report(test::test_main(test_args, Vec::from(TESTS), None))
162162
}}",
163-
nb_tests = self.nb_tests,
164163
output = self.output,
165164
ids = self.ids,
166165
)

0 commit comments

Comments
 (0)