Skip to content

Delegation: eliminate usage of AST from generics creation#154142

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
aerooneqq:dont-create-ast-generics-2
Mar 24, 2026
Merged

Delegation: eliminate usage of AST from generics creation#154142
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
aerooneqq:dont-create-ast-generics-2

Conversation

@aerooneqq

@aerooneqq aerooneqq commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

This PR eliminates all interaction with AST during creation of generics, then it supports proper const param types propagation. Fixes #153433. Fixes #153499. Part of #118212.

r? @petrochenkov

@rustbot

rustbot commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator

HIR ty lowering was modified

cc @fmease

@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. labels Mar 20, 2026
@petrochenkov petrochenkov added the F-fn_delegation `#![feature(fn_delegation)]` label Mar 20, 2026
Comment thread compiler/rustc_hir/src/hir.rs
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. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 20, 2026
@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-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 23, 2026
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. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 23, 2026
@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-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 24, 2026
Comment thread compiler/rustc_hir/src/hir.rs Outdated
Comment thread compiler/rustc_ast_lowering/src/delegation/generics.rs
@petrochenkov

Copy link
Copy Markdown
Contributor

r=me after addressing #154142 (comment) and squashing commits.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 24, 2026
@rustbot

rustbot commented Mar 24, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@aerooneqq aerooneqq force-pushed the dont-create-ast-generics-2 branch from 28594a7 to 1d325ce Compare March 24, 2026 11:16
@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-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 24, 2026
@petrochenkov

Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors

rust-bors Bot commented Mar 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1d325ce has been approved by petrochenkov

It is now in the queue for this repository.

@rust-bors rust-bors Bot added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 24, 2026
@rust-bors rust-bors Bot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 24, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 24, 2026
…-2, r=petrochenkov

Delegation: eliminate usage of AST from generics creation

This PR eliminates all interaction with AST during creation of generics, then it supports proper const param types propagation. Fixes rust-lang#153433. Fixes rust-lang#153499. Part of rust-lang#118212.

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

Delegation: eliminate usage of AST from generics creation

This PR eliminates all interaction with AST during creation of generics, then it supports proper const param types propagation. Fixes rust-lang#153433. Fixes rust-lang#153499. Part of rust-lang#118212.

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

Rollup of 7 pull requests

Successful merges:

 - #149218 (Make PinCoerceUnsized require Deref)
 - #154094 (add neon load/store assembly test)
 - #154142 (Delegation: eliminate usage of AST from generics creation)
 - #154276 (allow `incomplete_features` in more tests)
 - #154284 (doc: linker-plugin-based LTO: update list of good combinations)
 - #154286 (Cherry-pick 1.94.1 release notes)
 - #154303 (Remove more `BuiltinLintDiag` variants - part 2)
rust-bors Bot pushed a commit that referenced this pull request Mar 24, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #154094 (add neon load/store assembly test)
 - #154142 (Delegation: eliminate usage of AST from generics creation)
 - #154276 (allow `incomplete_features` in more tests)
 - #154284 (doc: linker-plugin-based LTO: update list of good combinations)
 - #154286 (Cherry-pick 1.94.1 release notes)
 - #154303 (Remove more `BuiltinLintDiag` variants - part 2)
@rust-bors rust-bors Bot merged commit 1cfbc50 into rust-lang:main Mar 24, 2026
11 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 24, 2026
@aerooneqq aerooneqq deleted the dont-create-ast-generics-2 branch March 25, 2026 06:29
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 25, 2026
…ochenkov

delegation: add const type ICE test

This PR adds test for rust-lang#154334 which was fixed by rust-lang#154142. Fixes rust-lang#154334. Part of rust-lang#118212.

r? @petrochenkov
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Mar 25, 2026
…ochenkov

delegation: add const type ICE test

This PR adds test for rust-lang#154334 which was fixed by rust-lang#154142. Fixes rust-lang#154334. Part of rust-lang#118212.

r? @petrochenkov
github-actions Bot pushed a commit to rust-lang/miri that referenced this pull request Mar 26, 2026
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.

[ICE]: adding a def'n for node-id NodeId(35) and def kind LifetimeParam but a previous def'n exists [ICE]: duplicate copy of DefId in lctx.children

3 participants