Skip to content

Retire hir::*ItemRef. #143357

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

cjgillot
Copy link
Contributor

@cjgillot cjgillot commented Jul 3, 2025

This information was kept for various places that iterate on HIR to know about trait-items and impl-items.

This PR replaces them by uses of the associated_items query that contain pretty much the same information.

This shortens many spans to just def_span, which can be easier to read.

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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 Jul 3, 2025
@cjgillot cjgillot force-pushed the no-assoc-item-kind branch from 1264eb5 to 4e5d3e2 Compare July 3, 2025 11:03
@cjgillot
Copy link
Contributor Author

cjgillot commented Jul 3, 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 Jul 3, 2025
@bors
Copy link
Collaborator

bors commented Jul 3, 2025

⌛ Trying commit 4e5d3e2 with merge 2d047d1...

bors added a commit that referenced this pull request Jul 3, 2025
Retire hir::*ItemRef.

r? `@ghost` for perf
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Jul 3, 2025

☀️ Try build successful - checks-actions
Build commit: 2d047d1 (2d047d1af1d10ea3b11563dc0347bfc68cf188e9)

@rust-timer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Jul 4, 2025

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

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

Finished benchmarking commit (2d047d1): 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.2% [0.1%, 0.2%] 4
Regressions ❌
(secondary)
0.5% [0.2%, 0.7%] 11
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.1% [-11.6%, -0.2%] 13
All ❌✅ (primary) 0.2% [0.1%, 0.2%] 4

Max RSS (memory usage)

Results (primary 0.7%, secondary 0.9%)

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

mean range count
Regressions ❌
(primary)
1.9% [1.8%, 2.0%] 2
Regressions ❌
(secondary)
0.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
-1.6% [-1.6%, -1.6%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [-1.6%, 2.0%] 3

Cycles

Results (secondary -4.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)
4.1% [4.1%, 4.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-6.0% [-8.2%, -3.0%] 8
All ❌✅ (primary) - - 0

Binary size

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

Bootstrap: 461.527s -> 461.455s (-0.02%)
Artifact size: 372.16 MiB -> 372.04 MiB (-0.03%)

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

rustbot commented Jul 4, 2025

r? @SparrowLii

rustbot has assigned @SparrowLii.
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 4, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jul 4, 2025

Changes to the size of AST and/or HIR nodes.

cc @nnethercote

changes to the core type system

cc @compiler-errors, @lcnr

Some changes occurred in match checking

cc @Nadrieril

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

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

cc @jdonszelmann

@cjgillot cjgillot force-pushed the no-assoc-item-kind branch from 643804d to 8063b5b Compare July 4, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) perf-regression Performance regression. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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. 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.

6 participants