-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better documentation for env::home_dir()'s broken behaviour #101648
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 <[email protected]>
@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
HOME
on Windows which is meaningless there. Note that the PR that deprecated it stated that returning an empty string ifHOME
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 ifHOME
is unset it gives an explicitHOME not set
error.std::env::home_dir
and fix incorrect documentation #51656See #71684