about summary refs log tree commit diff
path: root/library/std/src/process/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/process/tests.rs')
-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();