]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #101648 - Timmmm:home_dir_docs, r=joshtriplett
authorMatthias Krüger <matthias.krueger@famsik.de>
Sun, 11 Dec 2022 22:36:44 +0000 (23:36 +0100)
committerGitHub <noreply@github.com>
Sun, 11 Dec 2022 22:36:44 +0000 (23:36 +0100)
commit668976b80ad6ca3bfbc0cddf9e676b289c07fc49
tree16d3a7c1a4341f3a2f9b8f34b67f650c779ea305
parent657eefe2dcf18f76ac67a39945810128e101178c
parent8f0025e5a3346b1cfcc64abca7bf768f25d1ff9e
Rollup merge of #101648 - Timmmm:home_dir_docs, r=joshtriplett

Better documentation for env::home_dir()'s broken behaviour

This improves the documentation to say *why* it was deprecated. The reason was because it reads `HOME` on Windows which is meaningless there. Note that the PR that deprecated it stated that returning an empty string if `HOME` is set to an empty string was a problem, however I can find no evidence that this is the case. `cd` handles it fine whereas if `HOME` is unset it gives an explicit `HOME not set` error.

* Original deprecation reason: https://internals.rust-lang.org/t/deprecate-or-break-fix-std-env-home-dir/7315
* Original deprecation PR: https://github.com/rust-lang/rust/pull/51656

See #71684
library/std/src/env.rs