Skip to content

Commit

Permalink
Rollup merge of #138189 - GuillaumeGomez:env-var, r=joshtriplett
Browse files Browse the repository at this point in the history
Mention `env` and `option_env` macros in `std::env::var` docs

Fixes #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.
  • Loading branch information
jhpratt authored Mar 8, 2025
2 parents 2c374e3 + 17dd2b1 commit 6576d35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/std/src/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
/// ```
Expand Down

0 comments on commit 6576d35

Please sign in to comment.