File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments