@@ -29,13 +29,12 @@ use std::path::PathBuf;
29
29
use std:: process:: { self , Command , Stdio } ;
30
30
use std:: sync:: atomic:: { AtomicBool , Ordering } ;
31
31
use std:: sync:: { Arc , OnceLock } ;
32
- use std:: time:: { Duration , Instant , SystemTime } ;
32
+ use std:: time:: { Instant , SystemTime } ;
33
33
use std:: { env, str} ;
34
34
35
35
use rustc_ast as ast;
36
36
use rustc_codegen_ssa:: traits:: CodegenBackend ;
37
37
use rustc_codegen_ssa:: { CodegenErrors , CodegenResults } ;
38
- use rustc_const_eval:: CTRL_C_RECEIVED ;
39
38
use rustc_data_structures:: profiling:: {
40
39
TimePassesFormat , get_resident_set_size, print_time_passes_entry,
41
40
} ;
@@ -1577,8 +1576,8 @@ pub fn install_ctrlc_handler() {
1577
1576
// time to check CTRL_C_RECEIVED and run its own shutdown logic, but after a short amount
1578
1577
// of time exit the process. This sleep+exit ensures that even if nobody is checking
1579
1578
// CTRL_C_RECEIVED, the compiler exits reasonably promptly.
1580
- CTRL_C_RECEIVED . store( true , Ordering :: Relaxed ) ;
1581
- std:: thread:: sleep( Duration :: from_millis( 100 ) ) ;
1579
+ rustc_const_eval :: CTRL_C_RECEIVED . store( true , Ordering :: Relaxed ) ;
1580
+ std:: thread:: sleep( std :: time :: Duration :: from_millis( 100 ) ) ;
1582
1581
std:: process:: exit( 1 ) ;
1583
1582
} )
1584
1583
. expect( "Unable to install ctrlc handler" ) ;
0 commit comments