Skip to content

Pass the whole GenericArgs to Interner::for_each_relevant_impl()#156295

Open
ChayimFriedman2 wants to merge 1 commit intorust-lang:mainfrom
ChayimFriedman2:for-each-impl-args
Open

Pass the whole GenericArgs to Interner::for_each_relevant_impl()#156295
ChayimFriedman2 wants to merge 1 commit intorust-lang:mainfrom
ChayimFriedman2:for-each-impl-args

Conversation

@ChayimFriedman2
Copy link
Copy Markdown
Contributor

@ChayimFriedman2 ChayimFriedman2 commented May 7, 2026

Pass the whole GenericArgs to Interner::for_each_relevant_impl()

And not just the self type.

rustc does not make use of this, but rust-analyzer needs it to support impls in the same block as args, see https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/non.20local.20impls.20for.20generic.20args/with/593629693.

I'm not entirely sure this covers all cases (e.g. an unnormalized alias), and want feedback from a types team member.

r? types

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels May 7, 2026
@fmease
Copy link
Copy Markdown
Member

fmease commented May 8, 2026

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 8, 2026
rust-bors Bot pushed a commit that referenced this pull request May 8, 2026
Pass the whole `GenericArgs` to `Interner::for_each_relevant_impl()`
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 8, 2026

☀️ Try build successful (CI)
Build commit: f3ca1e1 (f3ca1e1620d490fd13130ed418f39f03c99ffd2d, parent: 3e353d7353b0cd6fa4eefd5c882457cc2708184c)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (f3ca1e1): comparison URL.

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

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@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
Regressions ❌
(secondary)
0.0% [0.0%, 0.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 2
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary 3.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)
3.9% [3.9%, 3.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

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

Binary size

Results (primary 0.0%, secondary 0.1%)

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

mean range count
Regressions ❌
(primary)
0.0% [0.0%, 0.0%] 3
Regressions ❌
(secondary)
0.1% [0.0%, 0.1%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.0% [0.0%, 0.0%] 3

Bootstrap: 497.449s -> 499.373s (0.39%)
Artifact size: 397.06 MiB -> 395.13 MiB (-0.49%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 8, 2026
@rust-bors

This comment has been minimized.

And not just the self type.

rustc does not make use of this, but rust-analyzer needs it to support impls in the same block as args, see https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/non.20local.20impls.20for.20generic.20args/with/593629693.

I'm not entirely sure this covers all cases (e.g. an unnormalized alias), and wants feedback from a types team member.
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 9, 2026

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants