Skip to content

delegation: rename Self generic param to This in recursive delegations#155635

Open
aerooneqq wants to merge 1 commit intorust-lang:mainfrom
aerooneqq:delegation-generics-Self-rename
Open

delegation: rename Self generic param to This in recursive delegations#155635
aerooneqq wants to merge 1 commit intorust-lang:mainfrom
aerooneqq:delegation-generics-Self-rename

Conversation

@aerooneqq
Copy link
Copy Markdown
Contributor

@aerooneqq aerooneqq commented Apr 22, 2026

This PR supports renaming of Self generic parameter to This in recursive delegations scenario, this allows propagation of This as we rely on Self naming to check whether it is implicit Self of a trait. Comment with a bit deeper explanation is in uplift_delegation_generic_params. Part of #118212.

r? @petrochenkov

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 22, 2026
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 22, 2026
@petrochenkov petrochenkov added the F-fn_delegation `#![feature(fn_delegation)]` label Apr 22, 2026
Comment thread tests/ui/delegation/generics/synth-params-ice-154780.rs Outdated
Comment thread compiler/rustc_ast_lowering/src/delegation/generics.rs Outdated
Comment thread compiler/rustc_ast_lowering/src/delegation/generics.rs Outdated
Comment thread compiler/rustc_ast_lowering/src/delegation/generics.rs Outdated
Comment thread compiler/rustc_ast_lowering/src/delegation/generics.rs Outdated
@petrochenkov petrochenkov added 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. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 22, 2026
@petrochenkov
Copy link
Copy Markdown
Contributor

Blocked on #155644.
@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 23, 2026
@rust-bors

This comment has been minimized.

@aerooneqq aerooneqq force-pushed the delegation-generics-Self-rename branch from 1522d6b to b7cb240 Compare April 24, 2026 06:57
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 24, 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.

@aerooneqq
Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Apr 24, 2026
@aerooneqq aerooneqq force-pushed the delegation-generics-Self-rename branch from b7cb240 to 7f2a98d Compare April 24, 2026 06:59
@petrochenkov
Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 24, 2026

📌 Commit 7f2a98d has been approved by petrochenkov

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 Apr 24, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 24, 2026
…-rename, r=petrochenkov

delegation: rename `Self` generic param to `This` in recursive delegations

This PR supports renaming of `Self` generic parameter to `This` in recursive delegations scenario, this allows propagation of `This` as we rely on `Self` naming to check whether it is implicit Self of a trait. Comment with a bit deeper explanation is in `uplift_delegation_generic_params`. Part of rust-lang#118212.

r? @petrochenkov
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 24, 2026
…-rename, r=petrochenkov

delegation: rename `Self` generic param to `This` in recursive delegations

This PR supports renaming of `Self` generic parameter to `This` in recursive delegations scenario, this allows propagation of `This` as we rely on `Self` naming to check whether it is implicit Self of a trait. Comment with a bit deeper explanation is in `uplift_delegation_generic_params`. Part of rust-lang#118212.

r? @petrochenkov
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 24, 2026
…-rename, r=petrochenkov

delegation: rename `Self` generic param to `This` in recursive delegations

This PR supports renaming of `Self` generic parameter to `This` in recursive delegations scenario, this allows propagation of `This` as we rely on `Self` naming to check whether it is implicit Self of a trait. Comment with a bit deeper explanation is in `uplift_delegation_generic_params`. Part of rust-lang#118212.

r? @petrochenkov
rust-bors Bot pushed a commit that referenced this pull request Apr 24, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #149452 (Refactor out common code into a `IndexItem::new` constructor)
 - #155621 (Document #[diagnostic::on_move] in the unstable book.)
 - #155635 (delegation: rename `Self` generic param to `This` in recursive delegations)
 - #155730 (Some cleanups around per parent disambiguators)
 - #153537 (rustc_codegen_ssa: Define ELF flag value for sparc-unknown-linux-gnu)
 - #155219 (Do not suggest borrowing enclosing calls for nested where-clause obligations)
 - #155408 (rustdoc: Fix Managarm C Library name in cfg pretty printer)
 - #155571 (Enable AddressSanitizer on arm-unknown-linux-gnueabihf and armv7-unknown-linux-gnueabihf)
 - #155713 (test: Add a regression test for Apple platforms aborting on `free`)
 - #155723 (Fix tier level for 5 thumb bare-metal ARM targets)
 - #155735 (Fix typo by removing extra 'to')
 - #155736 (Remove `AllVariants` workaround for rust-analyzer)
rust-bors Bot pushed a commit that referenced this pull request Apr 24, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #149452 (Refactor out common code into a `IndexItem::new` constructor)
 - #155621 (Document #[diagnostic::on_move] in the unstable book.)
 - #155635 (delegation: rename `Self` generic param to `This` in recursive delegations)
 - #155730 (Some cleanups around per parent disambiguators)
 - #153537 (rustc_codegen_ssa: Define ELF flag value for sparc-unknown-linux-gnu)
 - #155219 (Do not suggest borrowing enclosing calls for nested where-clause obligations)
 - #155408 (rustdoc: Fix Managarm C Library name in cfg pretty printer)
 - #155571 (Enable AddressSanitizer on arm-unknown-linux-gnueabihf and armv7-unknown-linux-gnueabihf)
 - #155713 (test: Add a regression test for Apple platforms aborting on `free`)
 - #155723 (Fix tier level for 5 thumb bare-metal ARM targets)
 - #155735 (Fix typo by removing extra 'to')
 - #155736 (Remove `AllVariants` workaround for rust-analyzer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-fn_delegation `#![feature(fn_delegation)]` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants