Move query-stack-frame spans into QueryStackFrame#153998
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Mar 18, 2026
Merged
Move query-stack-frame spans into QueryStackFrame#153998rust-bors[bot] merged 1 commit intorust-lang:mainfrom
QueryStackFrame#153998rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
nnethercote
approved these changes
Mar 17, 2026
| /// | ||
| /// This is mostly used in case of cycles for error reporting. | ||
| #[derive(Clone, Debug)] | ||
| pub struct QueryStackFrame<'tcx> { |
Contributor
There was a problem hiding this comment.
Should the Clone derive be removed, or a Copy derive be added?
Member
Author
There was a problem hiding this comment.
Looks like it can just be removed.
Code that previously used `QueryStackFrame` now uses `TaggedQueryKey` directly. Code that previously used `Spanned<QueryStackFrame>` now uses `QueryStackFrame`, which includes a span.
Collaborator
|
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. |
Member
Author
|
Rebased and removed the @bors r=nnethercote |
Contributor
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Mar 18, 2026
Move query-stack-frame spans into `QueryStackFrame` - Follow-up to rust-lang#153907 (comment). --- Code that previously used `QueryStackFrame` now uses `TaggedQueryKey` directly. Code that previously used `Spanned<QueryStackFrame>` now uses `QueryStackFrame`, which includes a span. This ends up bringing QueryStackFrame closer to the expectations of the code that actually consumes query cycles, and also avoids the awkward and misleading `respan` calls and `node` field accesses that had been required by `Spanned`. r? nnethercote
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.
QueryStackFrame#153907 (comment).Code that previously used
QueryStackFramenow usesTaggedQueryKeydirectly.Code that previously used
Spanned<QueryStackFrame>now usesQueryStackFrame, which includes a span.This ends up bringing QueryStackFrame closer to the expectations of the code that actually consumes query cycles, and also avoids the awkward and misleading
respancalls andnodefield accesses that had been required bySpanned.r? nnethercote