Rollup of 4 pull requests#153714
Closed
JonathanBrouwer wants to merge 10 commits intorust-lang:mainfrom
Closed
Conversation
remove span_delayed_bug
There is a bunch of complexity supporting the "cannot check whether the hidden type of opaque type satisfies auto traits" error that shows up in `tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that shows up in a single test. If we are willing to downgrade that error message to a cycle error, we can do the following. - Simplify the `type_of_opaque` return value. - Remove the `cycle_stash` query modifier. - Remove the `CyclePlaceholder` type. - Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown` variant. - Remove a `FromCycleError` impl. - Remove `report_opaque_type_auto_trait_leakage`. - Remove the `StashKey::Cycle` variant. - Remove the `CycleErrorHandling::Stash` variant. That's a lot! I think this is a worthwhile trade-off.
This simplifies the inner function's signature, and makes it more consistent with other uses of `for_each_query_vtable!`.
…mann Avoid ICE when an EII declaration conflicts with a constructor Fixes rust-lang#153502 When an `#[eii]` declaration conflicts with a tuple-struct constructor of the same name, error recovery can resolve the EII target to the constructor instead of the generated foreign item. `compare_eii_function_types` then assumes that target is a foreign function and later ICEs while building diagnostics. This pull request adds an early guard in `compare_eii_function_types` to skip EII signature comparison unless the resolved target is actually a foreign function.
Simplify `type_of_opaque`. There is a bunch of complexity supporting the "cannot check whether the hidden type of opaque type satisfies auto traits" error that shows up in `tests/ui/impl-trait/auto-trait-leak.rs`. This is an obscure error that shows up in a single test. If we are willing to downgrade that error message to a cycle error, we can do the following. - Simplify the `type_of_opaque` return value. - Remove the `cycle_stash` query modifier. - Remove the `CyclePlaceholder` type. - Remove the `SelectionError::OpaqueTypeAutoTraitLeakageUnknown` variant. - Remove a `FromCycleError` impl. - Remove `report_opaque_type_auto_trait_leakage`. - Remove the `StashKey::Cycle` variant. - Remove the `CycleErrorHandling::Stash` variant. That's a lot! I think this is a worthwhile trade-off. r? @oli-obk
…cote Introduce `for_each_query_vtable!` to move more code out of query macros After rust-lang#153114 moved a few for-each-query functions into the big `rustc_query_impl::plumbing` macro, I have found that those functions became much harder to navigate and modify, because they no longer have access to ordinary IDE features in rust-analyzer. Even *finding* the functions is considerably harder, because a plain go-to-definition no longer works smoothly. This PR therefore tries to move as much of that code back out of the macro as possible, with the aid of a smaller `for_each_query_vtable!` helper macro. A typical use of that macro looks like this: ```rust for_each_query_vtable!(ALL, tcx, |query| { query_key_hash_verify(query, tcx); }); ``` The result is an outer function consisting almost entirely of plain Rust code, with all of the usual IDE affordances expected of normal Rust code. Because it uses plain Rust syntax, it can also be formatted automatically by rustfmt. Adding another layer of macro-defined macros is not something I propose lightly, but in this case I think the improvement is well worth it: - The outer functions can once again be defined as “normal” Rust functions, right next to their corresponding inner functions, making navigation and modification much easier. - The closure expression is ordinary Rust code that simply gets repeated ~300 times in the expansion, once for each query, in order to account for the variety of key/value/cache types used by different queries. Even within the closure expression, IDE features still *mostly* work, which is an improvement over the status quo. - For future maintainers looking at the call site, the macro's effect should hopefully be pretty obvious and intuitive, reducing the need to even look at the helper macro. And the helper macro itself is largely straightforward, with its biggest complication being that it necessarily uses the `$name` metavar from the outer macro. There should be no change to compiler behaviour. r? nnethercote (or compiler)
remove `.ftl` checks from tidy These files have been removed following rust-lang/compiler-team#959. Part of rust-lang#151366.
Contributor
Author
|
@bors r+ rollup=never p=5 |
Contributor
Author
|
Trying commonly failed jobs |
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors bot
pushed a commit
that referenced
this pull request
Mar 11, 2026
Rollup of 4 pull requests try-job: test-various try-job: x86_64-gnu-aux try-job: x86_64-gnu-llvm-21-3 try-job: x86_64-msvc-1 try-job: aarch64-apple try-job: x86_64-mingw-1
This comment has been minimized.
This comment has been minimized.
Contributor
|
💔 Test for 818098d failed: CI. Failed job:
|
Contributor
Collaborator
|
A job failed! Check out the build log: (web) (plain enhanced) (plain) Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
This pull request was unapproved due to being closed. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
type_of_opaque. #153581 (Simplifytype_of_opaque.)for_each_query_vtable!to move more code out of query macros #153685 (Introducefor_each_query_vtable!to move more code out of query macros).ftlchecks from tidy #153710 (remove.ftlchecks from tidy)r? @ghost
Create a similar rollup