mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 03:07:24 +03:00
0425a45c89
docs: note env var influence on `temp_dir` and `env_clear` on Windows On Windows, `env::temp_dir()` internally calls `GetTempPath2`/`GetTempPath`, which checks the `TMP`, `TEMP`, and `USERPROFILE` environment variables in order before falling back to the Windows directory. This lookup order was previously only discoverable by following links to Microsoft documentation. This PR documents the env var lookup order directly in `env::temp_dir` docs and notes `GetTempPath2`'s SYSTEM-identity behavior (`C:\Windows\SystemTemp`). Addresses rust-lang/rust#125439.