Skip to content

Comments

Remove deterministic picking from query cycle handling#152229

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Zoxc:rem-det-pick
Feb 23, 2026
Merged

Remove deterministic picking from query cycle handling#152229
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Zoxc:rem-det-pick

Conversation

@Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Feb 6, 2026

This removes the deterministic picking of queries from the query cycle handling. The sets we pick from are themselves non-deterministic, making this ineffective. There may be additional entry points to the cycle which we won't discover until after we resume from the cycle handler and run more code.

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 6, 2026
@Zoxc
Copy link
Contributor Author

Zoxc commented Feb 7, 2026

cc @nnethercote

@rust-bors

This comment has been minimized.

@petrochenkov petrochenkov added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 13, 2026
@petrochenkov petrochenkov marked this pull request as ready for review February 13, 2026 14:52
@petrochenkov
Copy link
Contributor

If the existing approach is indeed non-deterministic, then this looks like a good simplification.
This will simplify #149849 as well, if merged.

cc @zetanumbers @Zalathar @nnethercote

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 14, 2026
rustc_query_impl: Use `ControlFlow` in `visit_waiters` instead of nested options

Noticed when reviewing rust-lang#152229.
rust-timer added a commit that referenced this pull request Feb 15, 2026
Rollup merge of #152582 - petrochenkov:waitvisit, r=TaKO8Ki

rustc_query_impl: Use `ControlFlow` in `visit_waiters` instead of nested options

Noticed when reviewing #152229.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Feb 15, 2026
rustc_query_impl: Use `ControlFlow` in `visit_waiters` instead of nested options

Noticed when reviewing rust-lang/rust#152229.
@nnethercote
Copy link
Contributor

Good simplification. The for<'a> HashStable<StableHashingContext<'a>> bound caused me some annoyance in the past, nice to see that gone.

r=me after rebasing and with petrochenkov's comments addressed.

@nnethercote nnethercote added 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 Feb 16, 2026
@nnethercote
Copy link
Contributor

The sets we pick from are themselves non-deterministic, making this ineffective.

Is it worth adding a comment somewhere that mentions this? Seems like useful information.

@zetanumbers
Copy link
Contributor

zetanumbers commented Feb 17, 2026

Ah, wait, you want my opinion? Uuh, well I did almost the same thing in #149849, so it should be ok.

@rustbot
Copy link
Collaborator

rustbot commented Feb 23, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@nnethercote
Copy link
Contributor

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 23, 2026

📌 Commit 9f7d502 has been approved by nnethercote

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. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 23, 2026
rust-bors bot pushed a commit that referenced this pull request Feb 23, 2026
Rollup of 9 pull requests

Successful merges:

 - #152229 (Remove deterministic picking from query cycle handling)
 - #152970 (extend unpin noalias tests to cover mutable references)
 - #149783 (stabilize `cfg_select!`)
 - #151744 (fix refining_impl_trait suggestion with return_type_notation)
 - #152366 (Add try_shrink_to and try_shrink_to_fit to Vec)
 - #152640 (Add direct link to rustc-dev-guide in README)
 - #152963 (Revert "Stabilize `str_as_str`")
 - #152984 (Remove redundant call to `check_codegen_attributes_extra` in Inliner)
 - #152987 (Use `HashStable` derive in more places)
@rust-bors rust-bors bot merged commit 5ec5136 into rust-lang:main Feb 23, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 23, 2026
rust-timer added a commit that referenced this pull request Feb 23, 2026
Rollup merge of #152229 - Zoxc:rem-det-pick, r=nnethercote

Remove deterministic picking from query cycle handling

This removes the deterministic picking of queries from the query cycle handling. The sets we pick from are themselves non-deterministic, making this ineffective. There may be additional entry points to the cycle which we won't discover until after we resume from the cycle handler and run more code.
@Zoxc Zoxc deleted the rem-det-pick branch February 23, 2026 13:11
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) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants