Mention env and option_env macros in std::env::var docs

This commit is contained in:
Guillaume Gomez 2025-03-07 22:00:36 +01:00
parent 91a0e1604f
commit 17dd2b179c

View File

@ -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
///
/// ```