about summary refs log tree commit diff
path: root/library/std/src/env.rs
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2025-02-13 12:53:52 -0800
committerEric Huss <eric@huss.org>2025-02-13 13:10:28 -0800
commitef20a1b1f8c6dcbeb05da86634ca4516677a31b0 (patch)
tree10e60e7d8ed0b5a83038017a3ea3d9bb358777df /library/std/src/env.rs
parent36733f3bce9102647e8adf9d9a89cabcee9c4cdf (diff)
downloadrust-ef20a1b1f8c6dcbeb05da86634ca4516677a31b0.tar.gz
rust-ef20a1b1f8c6dcbeb05da86634ca4516677a31b0.zip
std: Apply deprecated_safe_2024
Diffstat (limited to 'library/std/src/env.rs')
-rw-r--r--library/std/src/env.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/env.rs b/library/std/src/env.rs
index c665dfd3624..adbd6889624 100644
--- a/library/std/src/env.rs
+++ b/library/std/src/env.rs
@@ -568,7 +568,7 @@ pub struct JoinPathsError {
 ///         let mut paths = env::split_paths(&path).collect::<Vec<_>>();
 ///         paths.push(PathBuf::from("/home/xyz/bin"));
 ///         let new_path = env::join_paths(paths)?;
-///         env::set_var("PATH", &new_path);
+///         unsafe { env::set_var("PATH", &new_path); }
 ///     }
 ///
 ///     Ok(())