Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove code duplication when hashing query result and interning node #135451

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

mzacho
Copy link
Contributor

@mzacho mzacho commented Jan 13, 2025

Refactored the duplicated code into a function.

with_feed_task currently passes the query key to debug_assert!. I believe that's a mistake, since with_task prints the DepNode which is more sensible, so this commit changes that, so it debug prints the DepNode.

Refactored the duplicated code into a function.

`with_feed_task` currently passes the query key to `debug_assert!`.
This commit changes that, so it debug prints the `DepNode`, as in
`with_task`.
@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2025

r? @cjgillot

rustbot has assigned @cjgillot.
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

@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 Jan 13, 2025
@oli-obk
Copy link
Contributor

oli-obk commented Jan 13, 2025

Good find!

r? @oli-obk

@bors r+

@bors
Copy link
Contributor

bors commented Jan 13, 2025

📌 Commit abe6032 has been approved by oli-obk

It is now in the queue for this repository.

@rustbot rustbot assigned oli-obk and unassigned cjgillot Jan 13, 2025
@bors bors 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 Jan 13, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 13, 2025
Remove code duplication when hashing query result and interning node

Refactored the duplicated code into a function.

`with_feed_task` currently passes the query key to `debug_assert!`. I believe that's a mistake, since `with_task` prints the `DepNode` which is more sensible, so this commit changes that, so it debug prints the `DepNode`.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#134498 (Fix cycle error only occurring with -Zdump-mir)
 - rust-lang#135440 (rm unnecessary `OpaqueTypeDecl` wrapper)
 - rust-lang#135441 (Make sure to mark `IMPL_TRAIT_REDUNDANT_CAPTURES` as `Allow` in edition 2024)
 - rust-lang#135444 (Update books)
 - rust-lang#135451 (Remove code duplication when hashing query result and interning node)
 - rust-lang#135452 (bootstrap: fix outdated feature name in comment)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2025
…iaskrgr

Rollup of 3 pull requests

Successful merges:

 - rust-lang#135381 (Add an example for `Vec::splice` inserting elements without removing)
 - rust-lang#135451 (Remove code duplication when hashing query result and interning node)
 - rust-lang#135464 (fix ICE with references to infinite structs in consts)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 62f2c3c into rust-lang:master Jan 14, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 14, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jan 14, 2025
Rollup merge of rust-lang#135451 - mzacho:code-duplication, r=oli-obk

Remove code duplication when hashing query result and interning node

Refactored the duplicated code into a function.

`with_feed_task` currently passes the query key to `debug_assert!`. I believe that's a mistake, since `with_task` prints the `DepNode` which is more sensible, so this commit changes that, so it debug prints the `DepNode`.
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.

5 participants