Skip to content

Remove GenericArgRef - #165079

Open
jdonszelmann wants to merge 4 commits into
rust-lang:mainfrom
jdonszelmann:remove-generic-arg-ref
Open

jdonszelmann wants to merge 4 commits into
rust-lang:mainfrom
jdonszelmann:remove-generic-arg-ref

Conversation

@jdonszelmann

Copy link
Copy Markdown
Contributor

This removes GenericArgsRef, renaming it to GenericArgs. GenericArgs used to be an unsized version of GenericArgsRef, the reference being just a type alias, but really having access to this unsized type available was not necessary.

This also makes GenericArgs a tuple struct, giving us the possibility to change its representation in the future.

r? @khyperia

Note

I've not used an LLM for any part of this PR, or any other PR I make. This includes any related work like research.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 28, 2026
@jdonszelmann
jdonszelmann force-pushed the remove-generic-arg-ref branch from db8233d to 0648d52 Compare October 28, 2026 14:16
@rustbot

rustbot commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

clippy is developed in its own repository. If possible, consider making this change to rust-lang/rust-clippy instead.

cc @rust-lang/clippy

Some changes occurred in compiler/rustc_codegen_llvm/src/debuginfo

cc @Walnut356

Some changes occurred to constck

cc @fee1-dead

rustc_codegen_cranelift is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_cranelift instead.

cc @bjorn3

changes to the core type system

cc @lcnr

changes to the core type system

cc @lcnr

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred in match checking

cc @Nadrieril

Some changes occurred in need_type_info.rs

cc @lcnr

Some changes occurred in compiler/rustc_sanitizers

cc @rcvalle

This PR changes MIR

cc @oli-obk, @RalfJung, @JakobDegen, @vakaras

changes to the core type system

cc @lcnr

This PR changes rustc_public

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

HIR ty lowering was modified

cc @fmease

Some changes occurred in exhaustiveness checking

cc @Nadrieril

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. PG-exploit-mitigations Project group: Exploit mitigations 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Oct 28, 2026
@rustbot

rustbot commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

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.

@jdonszelmann
jdonszelmann force-pushed the remove-generic-arg-ref branch from 0648d52 to 6e88965 Compare October 28, 2026 14:18
@rust-log-analyzer

This comment has been minimized.

@jdonszelmann
jdonszelmann force-pushed the remove-generic-arg-ref branch from 6e88965 to d2cbecf Compare October 28, 2026 14:36
@rust-log-analyzer

This comment has been minimized.

@rustbot

rustbot commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

rustc_codegen_gcc is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_gcc instead.

cc @antoyo, @GuillaumeGomez

@rust-log-analyzer

This comment has been minimized.

@jdonszelmann

Copy link
Copy Markdown
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 Oct 28, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 28, 2026
@rustbot

rustbot commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

miri is developed in its own repository. If the Miri part of this change can be broken out, consider making this change to rust-lang/miri instead. However, if Miri needs adjusting for rustc changes, just ignore this message.

cc @rust-lang/miri

@rust-bors

rust-bors Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: ec09e84 (ec09e84d2dc29e464cc8b7ae470eb365cc71a380)
Base parent: 41089d0 (41089d07a0a2afc16adfe28a760d94d73d7298a4)

@rust-timer

This comment has been minimized.

@khyperia

Copy link
Copy Markdown
Member

nice! good cleanup, unlocks cool future things :3 - r=me if perf is fineish

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (ec09e84): comparison URL.

Overall result: ❌✅ regressions and improvements - please read:

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

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=iffy rustc-perf
@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%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.6% [-1.3%, -0.2%] 18
All ❌✅ (primary) 0.2% [0.1%, 0.2%] 3

Max RSS (memory usage)

Results (primary -0.3%, secondary 0.5%)

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.4%, 1.2%] 7
Regressions ❌
(secondary)
0.5% [0.5%, 0.5%] 1
Improvements ✅
(primary)
-1.9% [-4.0%, -0.7%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.3% [-4.0%, 1.2%] 11

Cycles

Results (primary 0.3%)

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

mean range count
Regressions ❌
(primary)
0.9% [0.4%, 1.7%] 12
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.9% [-1.4%, -0.5%] 7
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [-1.4%, 1.7%] 19

Binary size

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

Bootstrap: 490.666s -> 487.322s (-0.68%)
Artifact size: 405.86 MiB -> 406.07 MiB (0.05%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Oct 28, 2026
@jdonszelmann

Copy link
Copy Markdown
Contributor Author

All tiny, yay! @bors r=khyperia

@rust-bors

rust-bors Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 101dc61 has been approved by khyperia

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Oct 29, 2026

This branch has not been deployed

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

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. perf-regression Performance regression. 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. 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