diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-03-08 01:27:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-08 01:27:23 -0500 |
| commit | 6576d35aef7f448c4f2322ffc87375fd0ff01c48 (patch) | |
| tree | 0978fa4b13298a1744044a4cbda87e71ecc1e6ce | |
| parent | 2c374e3e2140f6016b75a0de0d790fb5b766291f (diff) | |
| parent | 17dd2b179c4fab87975bb1c23ea2b869ca516ea5 (diff) | |
| download | rust-6576d35aef7f448c4f2322ffc87375fd0ff01c48.tar.gz rust-6576d35aef7f448c4f2322ffc87375fd0ff01c48.zip | |
Rollup merge of #138189 - GuillaumeGomez:env-var, r=joshtriplett
Mention `env` and `option_env` macros in `std::env::var` docs Fixes https://github.com/rust-lang/rust/issues/138159. Just like there are mentions in `env!` and `option_env!` docs to `std::env::var`, it'd be nice to have a "mention back" as well.
| -rw-r--r-- | library/std/src/env.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/env.rs b/library/std/src/env.rs index e62aeb2ede0..6961fa8ea94 100644 --- a/library/std/src/env.rs +++ b/library/std/src/env.rs @@ -202,6 +202,9 @@ impl fmt::Debug for VarsOs { /// Returns [`VarError::NotUnicode`] if the variable's value is not valid /// Unicode. If this is not desired, consider using [`var_os`]. /// +/// Use [`env!`] or [`option_env!`] instead if you want to check environment +/// variables at compile time. +/// /// # Examples /// /// ``` |
