-
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
Rollup of 6 pull requests #105565
Closed
Closed
Rollup of 6 pull requests #105565
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Co-authored-by: Josh Triplett <[email protected]>
This makes it clearer that it's not a lossless conversion, which I find helpful.
This is required to distinguish between cooked and raw byte string literals in an `ast::LitKind`, without referring to an adjacent `token::Lit`. It's a prerequisite for the next commit.
`token::Lit` contains a `kind` field that indicates what kind of literal it is. `ast::MetaItemLit` currently wraps a `token::Lit` but also has its own `kind` field. This means that `ast::MetaItemLit` encodes the literal kind in two different ways. This commit changes `ast::MetaItemLit` so it no longer wraps `token::Lit`. It now contains the `symbol` and `suffix` fields from `token::Lit`, but not the `kind` field, eliminating the redundancy.
To better match `MetaItemLit`.
There are better ways to create the meta items. - In the rustdoc tests, the commit adds `dummy_meta_item_name_value`, which matches the existing `dummy_meta_item_word` function and `dummy_meta_item_list` macro. - In `types.rs` the commit clones the existing meta item and then modifies the clone.
These two methods both produce a `MetaItemLit`, and then some of the call sites convert the `MetaItemLit` to a `token::Lit` with `as_token_lit`. This commit parameterises these two methods with a `mk_lit_char` closure, which can be used to produce either `MetaItemLit` or `token::Lit` directly as necessary.
It has a single call site in the HIR pretty printer, where the resulting token lit is immediately converted to a string. This commit replaces `LitKind::synthesize_token_lit` with a `Display` impl for `LitKind`, which can be used by the HIR pretty printer.
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
Migrate rustc_mir_build diagnostics Rebases rust-lang#100854 ~~The remaining issue is how to better resolve rust-lang@72bea68af4ee2a41c44998916f6a789163f12e7d~~ ~~The diagnostic macros seems to generate a broken diagnostic, and I couldn't figure out how to manually format the fluent message, so I hardcoded the format string for now. I'd like pointers to a better fix for this.~~ Also, I'm not 100% sure I didn't mess up a rebase somewhere 🙂 r? ```@davidtwco```
…trochenkov Remove `token::Lit` from `ast::MetaItemLit`. Currently `ast::MetaItemLit` represents the literal kind twice. This PR removes that redundancy. Best reviewed one commit at a time. r? ```@petrochenkov```
…eck, r=nagisa Don't call `diagnostic_hir_wf_check` query if we have infer variables Fixes rust-lang#105260
…KO8Ki Detect spurious ; before assoc fn body Fixes rust-lang#105226 r? `@TaKO8Ki`
…s, r=oli-obk Make encode_info_for_trait_item use queries instead of accessing the HIR This change avoids accessing the HIR on `encode_info_for_trait_item` and uses queries. We will need to execute this function for elements that have no HIR and by using queries we will be able to feed for definitions that have no HIR. r? `@oli-obk`
rustbot
added
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
A-translation
Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
rollup
A PR which is a rollup
labels
Dec 11, 2022
@bors r+ rollup=never p=5 |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Dec 11, 2022
⌛ Testing commit 636a65f with merge 765a3ea6c79ce183883c75c3eaeb93bb2fa77b25... |
💔 Test failed - checks-actions |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Dec 11, 2022
The job Click to see the possible cause of the failure (guessed by this bot)
|
Looks like this was superseded by another rollup, closing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-translation
Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic
rollup
A PR which is a rollup
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
token::Lit
fromast::MetaItemLit
. #105160 (Removetoken::Lit
fromast::MetaItemLit
.)diagnostic_hir_wf_check
query if we have infer variables #105283 (Don't calldiagnostic_hir_wf_check
query if we have infer variables)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup