Skip to content

Split-up stability_index query #143845

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

Merged
merged 16 commits into from
Jul 18, 2025
Merged

Split-up stability_index query #143845

merged 16 commits into from
Jul 18, 2025

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Jul 12, 2025

This PR aims to move deprecation and stability processing away from the monolithic stability_index query, and directly implement lookup_{deprecation,stability,body_stability,const_stability} queries.

The basic idea is to:

  • move per-attribute sanity checks into check_attr.rs;
  • move attribute compatibility checks into the MissingStabilityAnnotations visitor;
  • progressively dismantle the Annotator visitor and the stability_index query.

The first commit contains functional change, and now warns when #[automatically_derived] is applied on a non-trait impl block. The other commits should not change visible behaviour.

Perf in #143845 (comment) shows small but consistent improvement, except for unused-warnings case. That case being a stress test, I'm leaning towards accepting the regression.

This PR changes check_attr, so has a high conflict rate on that file. This should not cause issues for review.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 12, 2025
@cjgillot
Copy link
Contributor Author

@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 Jul 12, 2025
bors added a commit that referenced this pull request Jul 12, 2025
Split-up stability_index query

r? `@ghost` for perf
@bors
Copy link
Collaborator

bors commented Jul 12, 2025

⌛ Trying commit 609a38d with merge 5597f02...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Jul 12, 2025

☀️ Try build successful - checks-actions
Build commit: 5597f02 (5597f0229dcd4b4f18b13e858f611b259df9d724)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5597f02): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

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

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.3% [0.1%, 0.4%] 38
Regressions ❌
(secondary)
1.1% [0.1%, 3.2%] 27
Improvements ✅
(primary)
-0.3% [-0.6%, -0.2%] 33
Improvements ✅
(secondary)
-0.4% [-1.2%, -0.0%] 30
All ❌✅ (primary) -0.0% [-0.6%, 0.4%] 71

Max RSS (memory usage)

Results (primary 0.9%, secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.3% [3.3%, 3.3%] 1
Regressions ❌
(secondary)
2.1% [1.7%, 2.7%] 5
Improvements ✅
(primary)
-1.5% [-1.5%, -1.5%] 1
Improvements ✅
(secondary)
-5.2% [-6.2%, -4.3%] 2
All ❌✅ (primary) 0.9% [-1.5%, 3.3%] 2

Cycles

Results (primary 2.0%, secondary 2.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.0% [2.0%, 2.0%] 1
Regressions ❌
(secondary)
4.3% [2.3%, 8.8%] 11
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.0% [-3.7%, -2.2%] 4
All ❌✅ (primary) 2.0% [2.0%, 2.0%] 1

Binary size

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

Bootstrap: 466.126s -> 464.517s (-0.35%)
Artifact size: 374.63 MiB -> 372.12 MiB (-0.67%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Jul 13, 2025
@cjgillot cjgillot marked this pull request as ready for review July 13, 2025 13:15
@rustbot
Copy link
Collaborator

rustbot commented Jul 13, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
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 the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 13, 2025

Some changes occurred in compiler/rustc_passes/src/check_attr.rs

cc @jdonszelmann

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 13, 2025
@bors
Copy link
Collaborator

bors commented Jul 14, 2025

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

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good to me in general. A few minor issues.

I looked at the perf, and agreed that the regression re. unused warnings seems fine to accept.

@jieyouxu
Copy link
Member

@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 Jul 16, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 16, 2025

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

@jieyouxu
Copy link
Member

@bors p=10 (this is very conflict-prone due to check_attr.rs)

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jieyouxu
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 18, 2025

📌 Commit 7662731 has been approved by jieyouxu

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 18, 2025
@bors
Copy link
Collaborator

bors commented Jul 18, 2025

⌛ Testing commit 7662731 with merge 8f08b3a...

@bors
Copy link
Collaborator

bors commented Jul 18, 2025

☀️ Test successful - checks-actions
Approved by: jieyouxu
Pushing 8f08b3a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 18, 2025
@bors bors merged commit 8f08b3a into rust-lang:master Jul 18, 2025
12 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jul 18, 2025
Copy link
Contributor

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 8231065 (parent) -> 8f08b3a (this PR)

Test differences

Show 2 test diffs

2 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 8f08b3a32478b8d0507732800ecb548a76e0fd0c --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-aarch64-apple: 6537.1s -> 4757.3s (-27.2%)
  2. aarch64-apple: 5337.8s -> 4012.6s (-24.8%)
  3. dist-x86_64-apple: 7833.2s -> 9616.6s (22.8%)
  4. pr-check-2: 2202.6s -> 2661.6s (20.8%)
  5. dist-apple-various: 7691.3s -> 9106.0s (18.4%)
  6. x86_64-rust-for-linux: 2725.3s -> 3206.3s (17.6%)
  7. arm-android: 5852.0s -> 6746.5s (15.3%)
  8. x86_64-apple-2: 4737.8s -> 5415.0s (14.3%)
  9. pr-check-1: 1499.7s -> 1706.1s (13.8%)
  10. x86_64-msvc-ext2: 6429.3s -> 5568.8s (-13.4%)
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants