diff options
| author | bors <bors@rust-lang.org> | 2015-10-11 19:51:22 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-10-11 19:51:22 +0000 |
| commit | 8fbb35b8357d8cb4a105b56eb6af401c4d6802c9 (patch) | |
| tree | 03028ad7dbfb72858fe5802d155682c143cf5fdb /src/libstd | |
| parent | 9dafceb1f9df02bb0273af5f71b1824d6ce71f68 (diff) | |
| parent | 8667aa207b3de577d097a1c7b948d672f064617a (diff) | |
| download | rust-8fbb35b8357d8cb4a105b56eb6af401c4d6802c9.tar.gz rust-8fbb35b8357d8cb4a105b56eb6af401c4d6802c9.zip | |
Auto merge of #28960 - barosl:home-temp-dir-doc, r=alexcrichton
This concern was raised by #28940.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/env.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 3447d1683a8..518c67bbe7f 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -416,7 +416,10 @@ impl Error for JoinPathsError { /// Returns the value of the 'HOME' environment variable if it is /// set and not equal to the empty string. Otherwise, returns the value of the /// 'USERPROFILE' environment variable if it is set and not equal to the empty -/// string. +/// string. If both do not exist, [`GetUserProfileDirectory`][msdn] is used to +/// return the appropriate path. +/// +/// [msdn]: https://msdn.microsoft.com/en-us/library/windows/desktop/bb762280(v=vs.85).aspx /// /// # Examples /// @@ -442,7 +445,11 @@ pub fn home_dir() -> Option<PathBuf> { /// /// On Windows, returns the value of, in order, the 'TMP', 'TEMP', /// 'USERPROFILE' environment variable if any are set and not the empty -/// string. Otherwise, tmpdir returns the path to the Windows directory. +/// string. Otherwise, tmpdir returns the path to the Windows directory. This +/// behavior is identical to that of [GetTempPath][msdn], which this function +/// uses internally. +/// +/// [msdn]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa364992(v=vs.85).aspx /// /// ``` /// use std::env; |
