Skip to content

Handle rustc_middle cases of rustc::potential_query_instability lint #131160

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

Conversation

ismailarilik
Copy link
Contributor

This PR removes #![allow(rustc::potential_query_instability)] line from compiler/rustc_middle/src/lib.rs and converts FxHash{Map,Set} types into FxIndex{Map,Set} to suppress lint errors.

A somewhat tracking issue: #84447

r? @compiler-errors

@rustbot
Copy link
Collaborator

rustbot commented Oct 2, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @compiler-errors (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added 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 Oct 2, 2024
@rustbot
Copy link
Collaborator

rustbot commented Oct 2, 2024

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rust-log-analyzer

This comment has been minimized.

@ismailarilik ismailarilik marked this pull request as draft October 3, 2024 04:52
@ismailarilik ismailarilik force-pushed the handle-potential-query-instability-lint-for-rustc-middle branch from da9a8fd to 4c46978 Compare October 3, 2024 05:56
@rust-log-analyzer

This comment has been minimized.

@ismailarilik ismailarilik force-pushed the handle-potential-query-instability-lint-for-rustc-middle branch from 4c46978 to afeabb2 Compare October 3, 2024 07:46
@ismailarilik ismailarilik marked this pull request as ready for review October 3, 2024 09:02
@ismailarilik ismailarilik marked this pull request as draft October 4, 2024 08:24
@ismailarilik ismailarilik force-pushed the handle-potential-query-instability-lint-for-rustc-middle branch 2 times, most recently from e8cc67a to 0000613 Compare October 4, 2024 08:58
@ismailarilik ismailarilik marked this pull request as ready for review October 4, 2024 08:59
@bors
Copy link
Collaborator

bors commented Oct 10, 2024

☔ The latest upstream changes (presumably #131263) made this pull request unmergeable. Please resolve the merge conflicts.

@ismailarilik ismailarilik force-pushed the handle-potential-query-instability-lint-for-rustc-middle branch from 0000613 to 01e27a3 Compare October 28, 2024 10:15
@bors
Copy link
Collaborator

bors commented Nov 12, 2024

☔ The latest upstream changes (presumably #132282) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member

I'm gonna re-roll this so this PR gets more attention, sorry for my inactivity.

r? compiler

But also reassigning to author sicne I think this PR still needs updating.

@rustbot author

@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-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 23, 2025
@SparrowLii
Copy link
Member

@ismailarilik Can you rebase the PR today? I'm in holiday tomorrow so I"d like to have a review before that :)

@SparrowLii
Copy link
Member

r? compiler cause I'm going to the holidays in the next few days.

And I suggest to run a rustc perf when it's ready since this PR change the cache struct

@rustbot rustbot assigned estebank and unassigned SparrowLii Jan 26, 2025
@Dylan-DPC
Copy link
Member

@ismailarilik any updates on this? thanks

@rustbot rustbot added the has-merge-commits PR has merge commits, merge with caution. label Feb 26, 2025
@rustbot

This comment has been minimized.

@oli-obk
Copy link
Contributor

oli-obk commented May 1, 2025

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 1, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request May 1, 2025
…instability-lint-for-rustc-middle, r=<try>

Handle `rustc_middle` cases of `rustc::potential_query_instability` lint

This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_middle/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_middle/src/lib.rs#L29) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors.

A somewhat tracking issue: rust-lang#84447

r? `@compiler-errors`
@bors
Copy link
Collaborator

bors commented May 1, 2025

⌛ Trying commit 6bf8881 with merge 9d711dc...

@bors
Copy link
Collaborator

bors commented May 1, 2025

☀️ Try build successful - checks-actions
Build commit: 9d711dc (9d711dcae3bcbeb0efda0beffb8e957488893e63)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (9d711dc): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.6% [0.4%, 0.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -0.1%, secondary -0.8%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.8% [0.4%, 1.4%] 10
Regressions ❌
(secondary)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
-0.9% [-1.9%, -0.4%] 12
Improvements ✅
(secondary)
-3.7% [-3.7%, -3.7%] 1
All ❌✅ (primary) -0.1% [-1.9%, 1.4%] 22

Cycles

Results (primary -0.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.6% [0.4%, 0.9%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-1.0%, -0.4%] 14
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-1.0%, 0.9%] 20

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 768.358s -> 769.173s (0.11%)
Artifact size: 365.48 MiB -> 365.43 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 1, 2025
@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-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 2, 2025
@ismailarilik ismailarilik force-pushed the handle-potential-query-instability-lint-for-rustc-middle branch from 6bf8881 to 36f5a90 Compare May 5, 2025 13:35
@ismailarilik ismailarilik force-pushed the handle-potential-query-instability-lint-for-rustc-middle branch from 36f5a90 to 2426dbc Compare May 5, 2025 13:36
@ismailarilik ismailarilik requested a review from oli-obk May 5, 2025 13:37
@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 May 5, 2025
@oli-obk
Copy link
Contributor

oli-obk commented May 5, 2025

@bors r+

@bors
Copy link
Collaborator

bors commented May 5, 2025

📌 Commit 2426dbc has been approved by oli-obk

It is now in the queue for this repository.

@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 May 5, 2025
@bors
Copy link
Collaborator

bors commented May 6, 2025

⌛ Testing commit 2426dbc with merge 7295b08...

@bors
Copy link
Collaborator

bors commented May 6, 2025

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 7295b08 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 6, 2025
@bors bors merged commit 7295b08 into rust-lang:master May 6, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone May 6, 2025
Copy link

github-actions bot commented May 6, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 4a0969e (parent) -> 7295b08 (this PR)

Test differences

No test diffs found

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 7295b08a17d1107155acd4b552069e3705b0ab1f --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-x86_64-apple: 8260.1s -> 10045.2s (21.6%)
  2. dist-apple-various: 6615.2s -> 7972.3s (20.5%)
  3. x86_64-apple-2: 5720.8s -> 4724.5s (-17.4%)
  4. x86_64-apple-1: 9360.6s -> 8044.2s (-14.1%)
  5. dist-x86_64-illumos: 6240.1s -> 5763.6s (-7.6%)
  6. dist-x86_64-freebsd: 4808.8s -> 5100.8s (6.1%)
  7. dist-aarch64-linux: 5259.9s -> 5549.8s (5.5%)
  8. x86_64-gnu-llvm-19-2: 5979.8s -> 6289.2s (5.2%)
  9. x86_64-gnu-llvm-19-3: 6805.2s -> 7141.5s (4.9%)
  10. dist-x86_64-mingw: 7638.6s -> 8011.9s (4.9%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7295b08): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -0.2%, secondary 2.4%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.0% [1.2%, 3.4%] 3
Regressions ❌
(secondary)
2.4% [2.4%, 2.4%] 1
Improvements ✅
(primary)
-0.7% [-1.4%, -0.4%] 15
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-1.4%, 3.4%] 18

Cycles

Results (primary -0.6%, secondary -2.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.6% [0.4%, 1.1%] 16
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-1.7% [-6.8%, -0.4%] 16
Improvements ✅
(secondary)
-2.2% [-2.9%, -1.5%] 2
All ❌✅ (primary) -0.6% [-6.8%, 1.1%] 32

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 770.615s -> 771.005s (0.05%)
Artifact size: 365.41 MiB -> 365.42 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.