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
+3
View File
@@ -202,6 +202,9 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
/// 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
///
/// ```