Skip to content

Commit 585b572

Browse files
authored
Rollup merge of #136445 - bjorn3:diag_ctxt_cleanup, r=oli-obk
Couple of cleanups to DiagCtxt and EarlyDiagCtxt
2 parents 034b448 + 1e901f0 commit 585b572

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/bin/miri.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,8 @@ fn run_compiler_and_exit(
379379
callbacks: &mut (dyn rustc_driver::Callbacks + Send),
380380
) -> ! {
381381
// Invoke compiler, and handle return code.
382-
let exit_code = rustc_driver::catch_with_exit_code(move || {
383-
rustc_driver::run_compiler(args, callbacks);
384-
Ok(())
385-
});
382+
let exit_code =
383+
rustc_driver::catch_with_exit_code(move || rustc_driver::run_compiler(args, callbacks));
386384
std::process::exit(exit_code)
387385
}
388386

@@ -461,7 +459,7 @@ fn main() {
461459
// (`install_ice_hook` might change `RUST_BACKTRACE`.)
462460
let env_snapshot = env::vars_os().collect::<Vec<_>>();
463461

464-
let args = rustc_driver::args::raw_args(&early_dcx)
462+
let args = rustc_driver::catch_fatal_errors(|| rustc_driver::args::raw_args(&early_dcx))
465463
.unwrap_or_else(|_| std::process::exit(rustc_driver::EXIT_FAILURE));
466464

467465
// Install the ctrlc handler that sets `rustc_const_eval::CTRL_C_RECEIVED`, even if

0 commit comments

Comments
 (0)