Skip to content

Remove QueryInfo.#153639

Open
nnethercote wants to merge 2 commits intorust-lang:mainfrom
nnethercote:rm-QueryInfo
Open

Remove QueryInfo.#153639
nnethercote wants to merge 2 commits intorust-lang:mainfrom
nnethercote:rm-QueryInfo

Conversation

@nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Mar 10, 2026

View all comments

CycleError has one field containing a (Span, QueryStackFrame<I>) and another field containing a QueryInfo, which is a struct containing just a Span and a QueryStackFrame<I>.

We already have the Spanned type for adding a span to something. This commit uses it for both fields in CycleError, removing the need for QueryInfo. Which is good for the following reasons.

  • Any type with Info in the name is suspect, IMO.
  • QueryInfo can no longer be confused with the similar QueryJobInfo.
  • The doc comment on QueryInfo was wrong; it didn't contain a query key.

r? @Mark-Simulacrum

@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 10, 2026
@nnethercote
Copy link
Contributor Author

This should wait for #153493, to avoid causing conflicts.

cc @zetanumbers @Zoxc

@nnethercote nnethercote added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Mar 10, 2026
@zetanumbers
Copy link
Contributor

This is a good refactor.

@nnethercote nnethercote force-pushed the rm-QueryInfo branch 2 times, most recently from 75f763d to 0c04bfe Compare March 11, 2026 03:33
@rustbot

This comment has been minimized.

@nnethercote
Copy link
Contributor Author

I added a tiny commit to remove Clone from CycleError.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@nnethercote
Copy link
Contributor Author

I rebased.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot

This comment has been minimized.

@rust-bors

This comment has been minimized.

@petrochenkov
Copy link
Contributor

#153493 has landed, unblocking.
(Feel free to assign this to me when ready.)
@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 13, 2026
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Mar 13, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 13, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

`CycleError` has one field containing a `(Span, QueryStackFrame<I>)` and
another field containing a `QueryInfo`, which is a struct containing
just a `Span` and a `QueryStackFrame<I>`.

We already have the `Spanned` type for adding a span to something. This
commit uses it for both fields in `CycleError`, removing the need for
`QueryInfo`. Which is good for the following reasons.
- Any type with `Info` in the name is suspect, IMO.
- `QueryInfo` can no longer be confused with the similar `QueryJobInfo`.
- The doc comment on `QueryInfo` was wrong; it didn't contain a query
  key.
@rustbot
Copy link
Collaborator

rustbot commented Mar 13, 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 Author

I rebased.

r? @petrochenkov

Thank you for taking on the review. I have created a lot of PRs lately and I am trying to spread the reviews around, but that means there is some variance in the review times.

@nnethercote
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot 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 Mar 13, 2026
@petrochenkov
Copy link
Contributor

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 14, 2026

📌 Commit 39cf775 has been approved by petrochenkov

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-review Status: Awaiting review from the assignee but also interested parties. labels Mar 14, 2026
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