File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
compiler/rustc_driver_impl/src Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1507,7 +1507,7 @@ pub fn init_logger(early_dcx: &EarlyDiagCtxt, cfg: rustc_log::LoggerConfig) {
15071507}
15081508
15091509/// Install our usual `ctrlc` handler, which sets [`rustc_const_eval::CTRL_C_RECEIVED`].
1510- /// Makign this handler optional lets tools can install a different handler, if they wish.
1510+ /// Making this handler optional lets tools can install a different handler, if they wish.
15111511pub fn install_ctrlc_handler( ) {
15121512 ctrlc:: set_handler( move || {
15131513 // Indicate that we have been signaled to stop. If we were already signaled, exit
Original file line number Diff line number Diff line change @@ -344,6 +344,10 @@ fn main() {
344344 let args = rustc_driver:: args:: raw_args ( & early_dcx)
345345 . unwrap_or_else ( |_| std:: process:: exit ( rustc_driver:: EXIT_FAILURE ) ) ;
346346
347+ // Install the ctrlc handler that sets `rustc_const_eval::CTRL_C_RECEIVED`, even if
348+ // MIRI_BE_RUSTC is set.
349+ rustc_driver:: install_ctrlc_handler ( ) ;
350+
347351 // If the environment asks us to actually be rustc, then do that.
348352 if let Some ( crate_kind) = env:: var_os ( "MIRI_BE_RUSTC" ) {
349353 // Earliest rustc setup.
@@ -372,9 +376,6 @@ fn main() {
372376 let using_internal_features =
373377 rustc_driver:: install_ice_hook ( "https://github.com/rust-lang/miri/issues/new" , |_| ( ) ) ;
374378
375- // Install the ctrlc handler that sets `rustc_const_eval::CTRL_C_RECEIVED`.
376- rustc_driver:: install_ctrlc_handler ( ) ;
377-
378379 // Init loggers the Miri way.
379380 init_early_loggers ( & early_dcx) ;
380381
You can’t perform that action at this time.
0 commit comments