about summary refs log tree commit diff
path: root/library/std/src/env.rs
diff options
context:
space:
mode:
authorChris Denton <chris@chrisdenton.dev>2024-06-11 17:12:20 +0000
committerChris Denton <chris@chrisdenton.dev>2024-06-11 17:12:20 +0000
commit751143ef4031d06e718bcf859f1b3139716d043b (patch)
treeb328e3593f1557b0e9cc9c9fa4ab7742f74ed5aa /library/std/src/env.rs
parent0c960618b56f662d933e8b864cd9632a99174e87 (diff)
downloadrust-751143ef4031d06e718bcf859f1b3139716d043b.tar.gz
rust-751143ef4031d06e718bcf859f1b3139716d043b.zip
set_env: State the conclusion upfront
Diffstat (limited to 'library/std/src/env.rs')
-rw-r--r--library/std/src/env.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/library/std/src/env.rs b/library/std/src/env.rs
index 4d649f8a6f1..295e782639b 100644
--- a/library/std/src/env.rs
+++ b/library/std/src/env.rs
@@ -323,8 +323,10 @@ impl Error for VarError {
 /// This function is also always safe to call on Windows, in single-threaded
 /// and multi-threaded programs.
 ///
-/// In multi-threaded programs on other operating systems, we strongly suggest
-/// not using `set_var` or `remove_var` at all. The exact requirement is: you
+/// In multi-threaded programs on other operating systems, the only safe option is
+/// to not use `set_var` or `remove_var` at all.
+///
+/// The exact requirement is: you
 /// must ensure that there are no other threads concurrently writing or
 /// *reading*(!) the environment through functions or global variables other
 /// than the ones in this module. The problem is that these operating systems
@@ -390,8 +392,10 @@ unsafe fn _set_var(key: &OsStr, value: &OsStr) {
 /// This function is also always safe to call on Windows, in single-threaded
 /// and multi-threaded programs.
 ///
-/// In multi-threaded programs on other operating systems, we strongly suggest
-/// not using `set_var` or `remove_var` at all. The exact requirement is: you
+/// In multi-threaded programs on other operating systems, the only safe option is
+/// to not use `set_var` or `remove_var` at all.
+///
+/// The exact requirement is: you
 /// must ensure that there are no other threads concurrently writing or
 /// *reading*(!) the environment through functions or global variables other
 /// than the ones in this module. The problem is that these operating systems