File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " compiletest"
33version = " 0.0.0"
4- edition = " 2021 "
4+ edition = " 2024 "
55
66[lib ]
77doctest = false
Original file line number Diff line number Diff line change @@ -40,7 +40,9 @@ pub(crate) fn configure_gdb(config: &Config) -> Option<Arc<Config>> {
4040 //
4141 // we should figure out how to lift this restriction! (run them all
4242 // on different ports allocated dynamically).
43- env:: set_var ( "RUST_TEST_THREADS" , "1" ) ;
43+ //
44+ // SAFETY: at this point we are still single-threaded.
45+ unsafe { env:: set_var ( "RUST_TEST_THREADS" , "1" ) } ;
4446 }
4547
4648 Some ( Arc :: new ( Config { debugger : Some ( Debugger :: Gdb ) , ..config. clone ( ) } ) )
Original file line number Diff line number Diff line change @@ -529,10 +529,14 @@ pub fn run_tests(config: Arc<Config>) {
529529 }
530530 // Prevent issue #21352 UAC blocking .exe containing 'patch' etc. on Windows
531531 // If #11207 is resolved (adding manifest to .exe) this becomes unnecessary
532- env:: set_var ( "__COMPAT_LAYER" , "RunAsInvoker" ) ;
533-
534- // Let tests know which target they're running as
535- env:: set_var ( "TARGET" , & config. target ) ;
532+ //
533+ // SAFETY: at this point we're still single-threaded.
534+ unsafe { env:: set_var ( "__COMPAT_LAYER" , "RunAsInvoker" ) } ;
535+
536+ // Let tests know which target they're running as.
537+ //
538+ // SAFETY: at this point we're still single-threaded.
539+ unsafe { env:: set_var ( "TARGET" , & config. target ) } ;
536540
537541 let mut configs = Vec :: new ( ) ;
538542 if let Mode :: DebugInfo = config. mode {
You can’t perform that action at this time.
0 commit comments