Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions library/std/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,12 @@ impl Error for VarError {}
///
/// # Safety
///
/// This function is safe to call in a single-threaded program.
/// This function is sound to call in a single-threaded program.
///
/// This function is also always safe to call on Windows, in single-threaded
/// This function is also always sound to call on Windows, in single-threaded
/// and multi-threaded programs.
///
/// In multi-threaded programs on other operating systems, the only safe option is
/// In multi-threaded programs on other operating systems, the only sound option is
/// to not use `set_var` or `remove_var` at all.
///
/// The exact requirement is: you
Expand All @@ -322,7 +322,7 @@ impl Error for VarError {}
/// lookups from [`std::net::ToSocketAddrs`]. No stable guarantee is made about
/// which functions may read from the environment in future versions of a
/// library. All this makes it not practically possible for you to guarantee
/// that no other thread will read the environment, so the only safe option is
/// that no other thread will read the environment, so the only sound option is
/// to not use `set_var` or `remove_var` in multi-threaded programs at all.
///
/// Discussion of this unsafety on Unix may be found in:
Expand Down Expand Up @@ -366,12 +366,12 @@ pub unsafe fn set_var<K: AsRef<OsStr>, V: AsRef<OsStr>>(key: K, value: V) {
///
/// # Safety
///
/// This function is safe to call in a single-threaded program.
/// This function is sound to call in a single-threaded program.
///
/// This function is also always safe to call on Windows, in single-threaded
/// This function is also always sound to call on Windows, in single-threaded
/// and multi-threaded programs.
///
/// In multi-threaded programs on other operating systems, the only safe option is
/// In multi-threaded programs on other operating systems, the only sound option is
/// to not use `set_var` or `remove_var` at all.
///
/// The exact requirement is: you
Expand All @@ -385,7 +385,7 @@ pub unsafe fn set_var<K: AsRef<OsStr>, V: AsRef<OsStr>>(key: K, value: V) {
/// lookups from [`std::net::ToSocketAddrs`]. No stable guarantee is made about
/// which functions may read from the environment in future versions of a
/// library. All this makes it not practically possible for you to guarantee
/// that no other thread will read the environment, so the only safe option is
/// that no other thread will read the environment, so the only sound option is
/// to not use `set_var` or `remove_var` in multi-threaded programs at all.
///
/// Discussion of this unsafety on Unix may be found in:
Expand Down
Loading