Skip to content

Rollup of 5 pull requests#153802

Closed
Zalathar wants to merge 16 commits intorust-lang:mainfrom
Zalathar:rollup-DaIdKdL
Closed

Rollup of 5 pull requests#153802
Zalathar wants to merge 16 commits intorust-lang:mainfrom
Zalathar:rollup-DaIdKdL

Conversation

@Zalathar
Copy link
Member

Successful merges:

r? @ghost

Create a similar rollup

asder8215 and others added 16 commits February 28, 2026 22:28
These two types fit the pattern because they have no generics.
The `DerefMut` impl for `Providers` was removed in rust-lang#151096.
`tcx` is the usual name for `TyCtxt` parameters.
We compute `key_hash` in `try_execute_query`, so we can just pass the
value in.
`execute_job` has a single call site in `try_execute_query`. This commit
inlines and removes `execute_job`, but also puts the part that checks
feedable results in its own separate function, `check_feedable`, because
it's a nicely separate piece of logic.

The big win here is that all the code dealing with the `QueryState` is
now together in `try_execute_query`: get the lock, do the lookup, drop
the lock, create the job guard, and complete the job guard. Previously
these steps were split across two functions which I found hard to
follow.

This commit purely moves code around, there are no other changes.
The previous commit inlined `execute_job` without changing any of its
code. This commit does a few tiny follow-up changes.
By removing the ones in `compiler/rustc_middle/src/queries.rs`, and
making `compiler/rustc_middle/src/query/modifiers.rs` the single
source of truth.
…r=joboet

fixed VecDeque::splice() not filling the buffer correctly when resizing the buffer on start = end range

This PR fixes rust-lang#151758. The issue came from `Splice::move_tail`, which as joboet pointed out:
> The issue is in move_tail, which resizes the buffer, but fails to account for the resulting hole.

The problem with reserving more space through `VecDeque`'s `buf.reserve()` is that it doesn't update `VecDeque`'s `head`, which means that this code in `move_tail`:
```rust
deque.wrap_copy(
    deque.to_physical_idx(tail_start),
    deque.to_physical_idx(new_tail_start),
    self.tail_len,
);
```
could move over the section of data that `tail_start..tail_start + self.tail_len` of the buffer is supposed to be held at to the incorrect destination since all `.to_physical_idx()` is doing is a wrapping add on the `VecDeque`'s head with the passed in `idx` value.

To avoid this I decided to use `VecDeque::reserve` to both allocate more space into the `VecDeque` if necessary and update head appropriately. However, `VecDeque::reserve` internally relies on the `VecDeque`'s `len` field. Earlier in `VecDeque::splice`, it modifies the `VecDeque`'s `len` constructing the drain via `Drain::new` (as it does a `mem::replace` on `deque.len` with the start bound of the passed in `range`). The `VecDeque`'s `len` can also be potentially modified in the earlier `Splice::fill()` call if it does any replacement towards elements within the passed in `range` value for `VecDeque::splice()`. I needed to temporarily restore the `VecDeque`'s `len` to its actual len, so that `VecDeque::reserve` can work properly. Afterward, you can bring back the `VecDeque`'s `len` to what its value was before and fill the gap appropriately with the rest of the `replace_with` content.

r? @joboet
Miscellaneous tweaks

A hodge-podge of small changes that didn't fit anywhere else.

r? @yaahc
…ks, r=cjgillot

`try_execute_query` tweaks

Details in individual commits.

r? @cjgillot
implementation of `-Z min-recursion-limit`

impl of rust-lang/compiler-team#969, closes rust-lang#153132

r? lcnr
…Zalathar

Avoid duplicated query modifier comments.

There is currently some duplication.
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Mar 13, 2026
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustc-dev-guide Area: rustc-dev-guide 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. labels Mar 13, 2026
@Zalathar
Copy link
Member Author

Rollup of everything.

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 13, 2026

📌 Commit f2b0a3e has been approved by Zalathar

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 13, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 13, 2026

PR #153766, which is a member of this rollup, was unapproved.

This rollup was thus unapproved.

@rust-bors rust-bors bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 13, 2026
@rust-bors rust-bors bot mentioned this pull request Mar 13, 2026
@Zalathar Zalathar closed this Mar 13, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 13, 2026
@Zalathar Zalathar deleted the rollup-DaIdKdL branch March 13, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) A-rustc-dev-guide Area: rustc-dev-guide rollup A PR which is a rollup 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants