Skip to content

Commit 6576d35

Browse files
authored
Rollup merge of rust-lang#138189 - GuillaumeGomez:env-var, r=joshtriplett
Mention `env` and `option_env` macros in `std::env::var` docs Fixes rust-lang#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.
2 parents 2c374e3 + 17dd2b1 commit 6576d35

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/std/src/env.rs

+3
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ impl fmt::Debug for VarsOs {
202202
/// Returns [`VarError::NotUnicode`] if the variable's value is not valid
203203
/// Unicode. If this is not desired, consider using [`var_os`].
204204
///
205+
/// Use [`env!`] or [`option_env!`] instead if you want to check environment
206+
/// variables at compile time.
207+
///
205208
/// # Examples
206209
///
207210
/// ```

0 commit comments

Comments
 (0)