Skip to content

Commit 8fbb35b

Browse files
committed
Auto merge of #28960 - barosl:home-temp-dir-doc, r=alexcrichton
This concern was raised by #28940.
2 parents 9dafceb + 8667aa2 commit 8fbb35b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/libstd/env.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,10 @@ impl Error for JoinPathsError {
416416
/// Returns the value of the 'HOME' environment variable if it is
417417
/// set and not equal to the empty string. Otherwise, returns the value of the
418418
/// 'USERPROFILE' environment variable if it is set and not equal to the empty
419-
/// string.
419+
/// string. If both do not exist, [`GetUserProfileDirectory`][msdn] is used to
420+
/// return the appropriate path.
421+
///
422+
/// [msdn]: https://msdn.microsoft.com/en-us/library/windows/desktop/bb762280(v=vs.85).aspx
420423
///
421424
/// # Examples
422425
///
@@ -442,7 +445,11 @@ pub fn home_dir() -> Option<PathBuf> {
442445
///
443446
/// On Windows, returns the value of, in order, the 'TMP', 'TEMP',
444447
/// 'USERPROFILE' environment variable if any are set and not the empty
445-
/// string. Otherwise, tmpdir returns the path to the Windows directory.
448+
/// string. Otherwise, tmpdir returns the path to the Windows directory. This
449+
/// behavior is identical to that of [GetTempPath][msdn], which this function
450+
/// uses internally.
451+
///
452+
/// [msdn]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa364992(v=vs.85).aspx
446453
///
447454
/// ```
448455
/// use std::env;

0 commit comments

Comments
 (0)