Skip to content

Extend capabilities of TypeFoldable_Generic#157695

Open
Jamesbarford wants to merge 1 commit into
rust-lang:mainfrom
Jamesbarford:feat/extend-type-foldable-generic
Open

Extend capabilities of TypeFoldable_Generic#157695
Jamesbarford wants to merge 1 commit into
rust-lang:mainfrom
Jamesbarford:feat/extend-type-foldable-generic

Conversation

@Jamesbarford

Copy link
Copy Markdown
Contributor

Split from #156538.

  • Lets TypeFoldable_Generic derive structural folding for types with extra generic parameters by adding the necessary T: TypeFoldable<I> bounds automatically
  • Means in Refactor AliasTy & AliasTerm to use Alias #156538 we can remove the manual TypeFoldable implementation for NormalizesTo
  • Refactors shared traversal logic between Lift_Generic and TypeFoldable_Generic into a shared helper with a callback.

r? @lcnr

@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 Jun 10, 2026
Comment thread compiler/rustc_type_ir_macros/src/lib.rs Outdated
@Jamesbarford Jamesbarford force-pushed the feat/extend-type-foldable-generic branch from eacc8f6 to 0a4fcf1 Compare June 10, 2026 10:00
Comment thread compiler/rustc_type_ir_macros/src/lib.rs Outdated
@lcnr

lcnr commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

unfortunate to not use these changes in the same PR, but it's fine 😁

@bors delegate+

@rust-bors

rust-bors Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

✌️ @Jamesbarford, you can now approve this pull request!

If @lcnr told you to "r=me" after making some further change, then please make that change and post @bors r=lcnr.

View changes since this delegation.

@rustbot

rustbot commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@Jamesbarford

Copy link
Copy Markdown
Contributor Author

@bors r=lcnr

@rust-bors

rust-bors Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c65f522 has been approved by lcnr

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 Jun 11, 2026
@rust-log-analyzer

This comment has been minimized.

JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 11, 2026
…able-generic, r=lcnr

Extend capabilities of `TypeFoldable_Generic`

Split from rust-lang#156538.

- Lets `TypeFoldable_Generic` derive structural folding for types with extra generic parameters by adding the necessary `T: TypeFoldable<I>` bounds automatically
- Means in rust-lang#156538 we can remove the manual `TypeFoldable` implementation for `NormalizesTo`
- Refactors shared traversal logic between `Lift_Generic` and `TypeFoldable_Generic` into a shared helper with a callback.

r? @lcnr
@rust-bors rust-bors Bot 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 11, 2026
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 11, 2026
@rust-bors

rust-bors Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

⚠️ A new commit ba9ba44c16a72f342e51f53688b24a16bec9a695 was pushed.

This pull request was unapproved.

This PR was contained in a rollup (#157759), which was closed.

@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_type_ir_macros/Cargo.toml Outdated
@Jamesbarford Jamesbarford force-pushed the feat/extend-type-foldable-generic branch from c37c6d2 to 23e03d9 Compare June 12, 2026 08:24
@lcnr

lcnr commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 23e03d9 has been approved by lcnr

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 12, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 12, 2026
…able-generic, r=lcnr

Extend capabilities of `TypeFoldable_Generic`

Split from rust-lang#156538.

- Lets `TypeFoldable_Generic` derive structural folding for types with extra generic parameters by adding the necessary `T: TypeFoldable<I>` bounds automatically
- Means in rust-lang#156538 we can remove the manual `TypeFoldable` implementation for `NormalizesTo`
- Refactors shared traversal logic between `Lift_Generic` and `TypeFoldable_Generic` into a shared helper with a callback.

r? @lcnr
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 12, 2026
…able-generic, r=lcnr

Extend capabilities of `TypeFoldable_Generic`

Split from rust-lang#156538.

- Lets `TypeFoldable_Generic` derive structural folding for types with extra generic parameters by adding the necessary `T: TypeFoldable<I>` bounds automatically
- Means in rust-lang#156538 we can remove the manual `TypeFoldable` implementation for `NormalizesTo`
- Refactors shared traversal logic between `Lift_Generic` and `TypeFoldable_Generic` into a shared helper with a callback.

r? @lcnr
rust-bors Bot pushed a commit that referenced this pull request Jun 12, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #156950 (Staticlib rename internal symbols)
 - #157322 (test pre-stabilization items on CI)
 - #157490 (Add field-wise CoerceShared reborrow tests)
 - #157655 (Make Share::share final and improve docs)
 - #157688 (Create experimental test job `aarch64-apple-macos-26` for evaluating `macos-26` runner images)
 - #157796 (rustdoc: Some more lazy formatting)
 - #157069 (Test that you can't implement Unpin for a compiler-generated future using TAIT)
 - #157202 (add #[rustc_no_writable] to slice::get_unchecked_mut)
 - #157622 (Disable retagging for variadic arguments in const-eval)
 - #157684 (-Zassumptions-on-binders: insert empty assumptions when entering binders in the solver)
 - #157695 (Extend capabilities of `TypeFoldable_Generic`)
 - #157752 (Rename `errors.rs` file to `diagnostics.rs` (6/N))
 - #157766 (interpret: avoid computing layout of sized raw pointee)
 - #157785 (fuchsia: Support AddressSanitizer on riscv64gc-unknown-fuchsia)
 - #157795 (revert 157013)
 - #157798 (Prevent approving PRs that wait for Crater or formal decisions)
 - #157803 (Rename `errors.rs` file to `diagnostics.rs` (7/N))
rust-bors Bot pushed a commit that referenced this pull request Jun 12, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #156950 (Staticlib rename internal symbols)
 - #157322 (test pre-stabilization items on CI)
 - #157490 (Add field-wise CoerceShared reborrow tests)
 - #157655 (Make Share::share final and improve docs)
 - #157688 (Create experimental test job `aarch64-apple-macos-26` for evaluating `macos-26` runner images)
 - #157796 (rustdoc: Some more lazy formatting)
 - #157069 (Test that you can't implement Unpin for a compiler-generated future using TAIT)
 - #157202 (add #[rustc_no_writable] to slice::get_unchecked_mut)
 - #157622 (Disable retagging for variadic arguments in const-eval)
 - #157684 (-Zassumptions-on-binders: insert empty assumptions when entering binders in the solver)
 - #157695 (Extend capabilities of `TypeFoldable_Generic`)
 - #157752 (Rename `errors.rs` file to `diagnostics.rs` (6/N))
 - #157766 (interpret: avoid computing layout of sized raw pointee)
 - #157785 (fuchsia: Support AddressSanitizer on riscv64gc-unknown-fuchsia)
 - #157795 (revert 157013)
 - #157798 (Prevent approving PRs that wait for Crater or formal decisions)
 - #157803 (Rename `errors.rs` file to `diagnostics.rs` (7/N))
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 12, 2026
…able-generic, r=lcnr

Extend capabilities of `TypeFoldable_Generic`

Split from rust-lang#156538.

- Lets `TypeFoldable_Generic` derive structural folding for types with extra generic parameters by adding the necessary `T: TypeFoldable<I>` bounds automatically
- Means in rust-lang#156538 we can remove the manual `TypeFoldable` implementation for `NormalizesTo`
- Refactors shared traversal logic between `Lift_Generic` and `TypeFoldable_Generic` into a shared helper with a callback.

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

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.

6 participants