Better documentation for env::home_dir()'s broken behaviour#101648
Better documentation for env::home_dir()'s broken behaviour#101648bors merged 2 commits intorust-lang:masterfrom
Conversation
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: rust-lang#51656 See rust-lang#71684
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
(rust-highfive has picked a reviewer for you, use r? to override) |
|
Posted a suggestion with a rephrasing. Otherwise LGTM; 👍 for explaining the deprecation. r=me with the suggestion (or something similar) applied. |
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
|
@bors r=joshtriplett |
|
@bors rollup=always |
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: rust-lang#51656 See rust-lang#71684
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#101648 (Better documentation for env::home_dir()'s broken behaviour) - rust-lang#105283 (Don't call `diagnostic_hir_wf_check` query if we have infer variables) - rust-lang#105369 (Detect spurious ; before assoc fn body) - rust-lang#105472 (Make encode_info_for_trait_item use queries instead of accessing the HIR) - rust-lang#105521 (separate heading from body) - rust-lang#105555 (llvm-wrapper: adapt for LLVM API changes) - rust-lang#105560 (Extend rustdoc hashtag prepended line test) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This improves the documentation to say why it was deprecated. The reason was because it reads
HOMEon Windows which is meaningless there. Note that the PR that deprecated it stated that returning an empty string ifHOMEis set to an empty string was a problem, however I can find no evidence that this is the case.cdhandles it fine whereas ifHOMEis unset it gives an explicitHOME not seterror.std::env::home_dirand fix incorrect documentation #51656See #71684