We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbcbc78 commit 9877b26Copy full SHA for 9877b26
src/librustdoc/doctest.rs
@@ -404,11 +404,15 @@ pub(crate) fn run_tests(
404
std::mem::drop(temp_dir.take());
405
times.display_times();
406
});
407
+ } else {
408
+ // If the first condition branch exited successfully, `test_main_with_exit_callback` will
409
+ // not exit the process. So to prevent displaying the times twice, we put it behind an
410
+ // `else` condition.
411
+ times.display_times();
412
}
413
+ // We ensure temp dir destructor is called.
414
+ std::mem::drop(temp_dir);
415
if nb_errors != 0 {
- // We ensure temp dir destructor is called.
- std::mem::drop(temp_dir);
- times.display_times();
416
std::process::exit(test::ERROR_EXIT_CODE);
417
418
0 commit comments