From 3ec7e7aa87d0033198cbaaa88e7e170022296d4e Mon Sep 17 00:00:00 2001 From: Jacob Pratt Date: Tue, 28 Dec 2021 13:22:14 -0500 Subject: [PATCH] Future deprecation of `env::{set, remove}_var` --- library/std/src/env.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/std/src/env.rs b/library/std/src/env.rs index c06928647d389..5830c31e793c1 100644 --- a/library/std/src/env.rs +++ b/library/std/src/env.rs @@ -327,6 +327,7 @@ impl Error for VarError { /// assert_eq!(env::var(key), Ok("VALUE".to_string())); /// ``` #[stable(feature = "env", since = "1.0.0")] +#[rustc_deprecated(since = "TBD", reason = "method is unsound")] pub fn set_var, V: AsRef>(key: K, value: V) { _set_var(key.as_ref(), value.as_ref()) } @@ -369,6 +370,7 @@ fn _set_var(key: &OsStr, value: &OsStr) { /// assert!(env::var(key).is_err()); /// ``` #[stable(feature = "env", since = "1.0.0")] +#[rustc_deprecated(since = "TBD", reason = "method is unsound")] pub fn remove_var>(key: K) { _remove_var(key.as_ref()) }