Skip to content

Conversation

camsteffen
Copy link
Contributor

@camsteffen camsteffen commented Aug 9, 2025

The general goal is to have fewer query dependencies by making AssocItem aware of its parent impl kind (inherent vs. trait) without having to query the parent def_kind.

See individual commits.

@rustbot
Copy link
Collaborator

rustbot commented Aug 9, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
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-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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 Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 9, 2025

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred in compiler/rustc_sanitizers

cc @rcvalle

changes to the core type system

cc @compiler-errors, @lcnr

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

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

cc @jdonszelmann

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

@bors2 try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Aug 10, 2025
Make `AssocItem` aware of its impl kind
@rust-bors
Copy link

rust-bors bot commented Aug 10, 2025

⌛ Trying commit 77a42ec with merge ecc5941

To cancel the try build, run the command @bors try cancel.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 10, 2025
@rust-bors
Copy link

rust-bors bot commented Aug 10, 2025

☀️ Try build successful (CI)
Build commit: ecc5941 (ecc59411274ca4c68dad1b5a2b144afaf3510243, parent: 41ede7bd9bfbc9dc1e46c5c7de3b26524e5c61f0)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ecc5941): 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)
2.0% [0.5%, 3.2%] 3
Regressions ❌
(secondary)
2.3% [1.6%, 2.9%] 2
Improvements ✅
(primary)
-0.4% [-1.7%, -0.2%] 20
Improvements ✅
(secondary)
-0.5% [-1.1%, -0.2%] 40
All ❌✅ (primary) -0.1% [-1.7%, 3.2%] 23

Max RSS (memory usage)

Results (primary 1.4%, secondary -1.7%)

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

mean range count
Regressions ❌
(primary)
2.2% [0.5%, 6.3%] 21
Regressions ❌
(secondary)
3.4% [1.2%, 6.7%] 3
Improvements ✅
(primary)
-2.3% [-4.2%, -1.3%] 5
Improvements ✅
(secondary)
-6.9% [-7.0%, -6.8%] 3
All ❌✅ (primary) 1.4% [-4.2%, 6.3%] 26

Cycles

Results (primary 3.3%, 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)
3.3% [3.3%, 3.3%] 1
Regressions ❌
(secondary)
2.3% [1.6%, 3.0%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.3% [3.3%, 3.3%] 1

Binary size

Results (primary 0.3%, secondary 0.2%)

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

mean range count
Regressions ❌
(primary)
0.6% [0.1%, 1.8%] 10
Regressions ❌
(secondary)
1.8% [0.2%, 4.8%] 4
Improvements ✅
(primary)
-0.5% [-1.6%, -0.1%] 4
Improvements ✅
(secondary)
-0.4% [-0.5%, -0.1%] 12
All ❌✅ (primary) 0.3% [-1.6%, 1.8%] 14

Bootstrap: 463.257s -> 466.12s (0.62%)
Artifact size: 377.39 MiB -> 375.29 MiB (-0.56%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Aug 10, 2025
@bors

This comment was marked as resolved.

@petrochenkov
Copy link
Contributor

Oh! I misunderstood that. Okay, I'm going to look back over things with that in mind. I think you're right - I'll revert this change and maybe others.

@rustbot author

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 11, 2025
@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 12, 2025
@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Sep 12, 2025

This PR was rebased onto a different master 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.

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 13, 2025

📌 Commit b995a55 has been approved by petrochenkov

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 Sep 13, 2025
@bors
Copy link
Collaborator

bors commented Sep 13, 2025

⌛ Testing commit b995a55 with merge 637b50b...

@bors
Copy link
Collaborator

bors commented Sep 13, 2025

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 637b50b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 13, 2025
@bors bors merged commit 637b50b into rust-lang:master Sep 13, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Sep 13, 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 b50f345 (parent) -> 637b50b (this PR)

Test differences

Show 230 test diffs

230 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 637b50be01093962ac6f4432d6881ab41d6d90b4 --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. aarch64-gnu-llvm-19-1: 3607.9s -> 3924.2s (8.8%)
  2. tidy: 200.7s -> 184.1s (-8.3%)
  3. x86_64-gnu-tools: 3576.7s -> 3872.4s (8.3%)
  4. dist-various-1: 3954.7s -> 4261.0s (7.7%)
  5. dist-riscv64-linux: 4941.9s -> 5319.9s (7.6%)
  6. aarch64-gnu-debug: 4161.8s -> 4474.6s (7.5%)
  7. dist-powerpc-linux: 5046.4s -> 5409.6s (7.2%)
  8. dist-armhf-linux: 4856.3s -> 5200.8s (7.1%)
  9. aarch64-apple: 5521.1s -> 5884.8s (6.6%)
  10. dist-sparcv9-solaris: 4989.7s -> 5304.9s (6.3%)
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 (637b50b): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.3%, -0.1%] 15
Improvements ✅
(secondary)
-0.4% [-1.2%, -0.1%] 25
All ❌✅ (primary) -0.2% [-0.3%, -0.1%] 15

Max RSS (memory usage)

Results (primary -1.2%, secondary 1.9%)

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

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
9.0% [2.5%, 13.3%] 5
Improvements ✅
(primary)
-1.2% [-1.3%, -1.1%] 3
Improvements ✅
(secondary)
-7.0% [-11.6%, -2.2%] 4
All ❌✅ (primary) -1.2% [-1.3%, -1.1%] 3

Cycles

Results (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)
- - 0
Regressions ❌
(secondary)
3.2% [2.1%, 3.7%] 6
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.9% [-2.9%, -2.9%] 1
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.0%, 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)
0.2% [0.0%, 0.4%] 24
Regressions ❌
(secondary)
0.3% [0.1%, 0.8%] 24
Improvements ✅
(primary)
-0.1% [-0.2%, -0.0%] 40
Improvements ✅
(secondary)
-0.3% [-0.8%, -0.0%] 28
All ❌✅ (primary) -0.0% [-0.2%, 0.4%] 64

Bootstrap: 471.696s -> 474.269s (0.55%)
Artifact size: 390.21 MiB -> 390.15 MiB (-0.01%)

@nnethercote
Copy link
Contributor

Nice work, @camsteffen! Can I ask how you found this, i.e. identified it as something worth working on?

@camsteffen
Copy link
Contributor Author

Thanks @nnethercote! It was pretty unscientific. I just sleuth around the code and try to find things that could be neater or more direct. Some code paths around associated items just seemed to involve too many queries without short-circuiting for when only a certain impl kind is interesting.

@nnethercote
Copy link
Contributor

That's a valid way to do it :)

flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 18, 2025
…henkov

Make `AssocItem` aware of its impl kind

The general goal is to have fewer query dependencies by making `AssocItem` aware of its parent impl kind (inherent vs. trait) without having to query the parent def_kind.

See individual commits.
Muscraft pushed a commit to Muscraft/rust that referenced this pull request Sep 24, 2025
…henkov

Make `AssocItem` aware of its impl kind

The general goal is to have fewer query dependencies by making `AssocItem` aware of its parent impl kind (inherent vs. trait) without having to query the parent def_kind.

See individual commits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. PG-exploit-mitigations Project group: Exploit mitigations 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 Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants