File tree 1 file changed +3
-5
lines changed
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(
379
379
callbacks : & mut ( dyn rustc_driver:: Callbacks + Send ) ,
380
380
) -> ! {
381
381
// 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) ) ;
386
384
std:: process:: exit ( exit_code)
387
385
}
388
386
@@ -461,7 +459,7 @@ fn main() {
461
459
// (`install_ice_hook` might change `RUST_BACKTRACE`.)
462
460
let env_snapshot = env:: vars_os ( ) . collect :: < Vec < _ > > ( ) ;
463
461
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) )
465
463
. unwrap_or_else ( |_| std:: process:: exit ( rustc_driver:: EXIT_FAILURE ) ) ;
466
464
467
465
// 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