diff options
| author | bors <bors@rust-lang.org> | 2025-02-15 00:30:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-02-15 00:30:50 +0000 |
| commit | 54a0f387ea8c7bcb79b8e40c074a484d31b51990 (patch) | |
| tree | bd5bfdfaa0b9785d57db609764e8f6d867f6f932 /library/std/src/process | |
| parent | fc147b4a81bea997e544afa8f8f05af73c759231 (diff) | |
| parent | 9d659fc2bec22a991a1a728ec3f995c51386ff6e (diff) | |
Auto merge of #137046 - workingjubilee:rollup-u56aw1m, r=workingjubilee
Rollup of 10 pull requests Successful merges: - #133312 (triagebot: automatically add more rustdoc related labels) - #134016 (Stabilize `const_is_char_boundary` and `const_str_split_at`.) - #136971 (Add a new check-pass UI test for returning `impl Fn(T) -> impl Trait`) - #136983 (Prepare standard library for Rust 2024 migration) - #137002 (Fix early lint check desc in query) - #137006 (borrowck diagnostics cleanup: remove an unused and a barely-used field) - #137032 (Decode metadata buffer in one go) - #137035 (Normalize closure instance before eagerly monomorphizing it) - #137037 (add x86-sse2 (32bit) ABI that requires SSE2 target feature) - #137038 (llvm: Tolerate captures in tests) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/process')
| -rw-r--r-- | library/std/src/process/tests.rs | 8 |
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(); |
