Skip to content

Replace visit_waiters with waiters_of#153376

Open
Zoxc wants to merge 1 commit intorust-lang:mainfrom
Zoxc:cycle-waiters-iter
Open

Replace visit_waiters with waiters_of#153376
Zoxc wants to merge 1 commit intorust-lang:mainfrom
Zoxc:cycle-waiters-iter

Conversation

@Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Mar 4, 2026

This replaces visit_waiters which uses closures to visit waiters with waiters_of which returns a list of waiters. This makes the control flow of their users a bit clearer.

Additionally waiters_of includes non-query waiters unlike visit_waiters. This means that connected_to_root now considers resumable waiters from the compiler root as being connected to root, while previously only non-resumable waiters counted. This can result in some additional entry points being found. Similarly in the loop detecting entry points we now consider queries in the cycle with direct resumable waiters from the compiler root as being entry points.

When looking for entry points we now look at waiters until we found a query to populate the EntryPoint.waiter field instead of stopping when we determined it to be an entry point.

cc @petrochenkov @nnethercote

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) 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. labels Mar 4, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 4, 2026

r? @nnethercote

rustbot has assigned @nnethercote.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, query-system
  • compiler, query-system expanded to 69 candidates
  • Random selection from 16 candidates

@nnethercote nnethercote added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 4, 2026
@nnethercote
Copy link
Contributor

This is a smallish change to code that #153185 is proposing to completely rewrite. If that PR is accepted and merged then this one will be moot. So we need to reach a conclusion on that PR before considering this one.

@rustbot blocked

@Zoxc
Copy link
Contributor Author

Zoxc commented Mar 4, 2026

That's not how that works.

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-blocked Status: Blocked on something else such as an RFC or other implementation work. 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.

3 participants