about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/std/src/env.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/library/std/src/env.rs b/library/std/src/env.rs
index 50ae83090c7..215b7b03f04 100644
--- a/library/std/src/env.rs
+++ b/library/std/src/env.rs
@@ -198,13 +198,16 @@ impl fmt::Debug for VarsOs {
 ///
 /// # Errors
 ///
-/// This function will return an error if the environment variable isn't set.
+/// This function returns [`VarError::NotPresent`] if the environment variable
+/// isn't set.
 ///
-/// This function may return an error if the environment variable's name contains
-/// the equal sign character (`=`) or the NUL character.
+/// This function may return [`VarError::NotPresent`] if the
+/// environment variable's name contains the equal sign character (`=`) or the
+/// NUL character.
 ///
-/// This function will return an error if the environment variable's value is
-/// not valid Unicode. If this is not desired, consider using [`var_os`].
+/// This function will return [`VarError::NotUnicode`] if the environment
+/// variable's value is not valid Unicode. If this is not desired, consider
+/// using [`var_os`].
 ///
 /// # Examples
 ///