about summary refs log tree commit diff
path: root/library/std/src/process
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2025-02-17 13:20:12 +0200
committerLaurențiu Nicola <lnicola@dend.ro>2025-02-17 13:20:12 +0200
commitb571e8a8aca9e22834a80cd8bff13ef311b447a1 (patch)
tree34845c6ebfef9cb3705f610783a2b6da4a275b5b /library/std/src/process
parent19fa3deab30f89b0c5fb0b7144a074d95a35ab5e (diff)
parent273465e1f2932a30a5b56ac95859cdc86f3f33fa (diff)
Merge from rust-lang/rust
Diffstat (limited to 'library/std/src/process')
-rw-r--r--library/std/src/process/tests.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/library/std/src/process/tests.rs b/library/std/src/process/tests.rs
index 69273d863eb..5879914ca20 100644
--- a/library/std/src/process/tests.rs
+++ b/library/std/src/process/tests.rs
@@ -323,9 +323,13 @@ fn test_capture_env_at_spawn() {
 
     // This variable will not be present if the environment has already
     // been captured above.
-    env::set_var("RUN_TEST_NEW_ENV2", "456");
+    unsafe {
+        env::set_var("RUN_TEST_NEW_ENV2", "456");
+    }
     let result = cmd.output().unwrap();
-    env::remove_var("RUN_TEST_NEW_ENV2");
+    unsafe {
+        env::remove_var("RUN_TEST_NEW_ENV2");
+    }
 
     let output = String::from_utf8_lossy(&result.stdout).to_string();