Skip to content

reflection: fix ICE when TypeId::info called on ADT - #163663

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
yara-blue:reflection-ice-typeid-info
Oct 3, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
yara-blue:reflection-ice-typeid-info

Conversation

@yara-blue

Copy link
Copy Markdown
Contributor

We are refactoring from a large enum where the fields of the variants contain all the reflection info to a flat enum containing only the type kind (struct/bool/array etc). While we removed the fields of Struct, Enum and Union we forgot to take out the const eval code writing into those fields. That gave an ICE. This fixes that.

@rustbot

rustbot commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @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 Oct 2, 2026
@rustbot

rustbot commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

r? @chenyukang

rustbot has assigned @chenyukang.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 19 candidates

@yara-blue

Copy link
Copy Markdown
Contributor Author

r? oli-obk

@rustbot rustbot assigned oli-obk and unassigned chenyukang Oct 2, 2026
@rust-log-analyzer

This comment has been minimized.

@oli-obk oli-obk left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors delegate+

r=me with rustfmt applied

View changes since this review

@rust-bors

rust-bors Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

✌️ @yara-blue, you can now approve this pull request!

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

View changes since this delegation.

@yara-blue
yara-blue force-pushed the reflection-ice-typeid-info branch from fa44ecd to 3d1ef76 Compare October 2, 2026 19:28
@rust-bors

This comment has been minimized.

We are refactoring from a large enum where the fields of the variants
contain all the reflection info to a flat enum containing only the type
kind (struct/bool/array etc). While we removed the fields of Struct,
Enum and Union we forgot to take out the const eval code writing into
those fields. That gave an ICE. This fixes that.
@yara-blue
yara-blue force-pushed the reflection-ice-typeid-info branch from 3d1ef76 to da0baa2 Compare October 2, 2026 20:38
@rustbot

rustbot commented Oct 2, 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.

@yara-blue

Copy link
Copy Markdown
Contributor Author

@bors r=oli-obk

@rust-bors

rust-bors Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

📌 Commit da0baa2 has been approved by oli-obk

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 2, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 3, 2026
…fo, r=oli-obk

reflection: fix ICE when TypeId::info called on ADT

We are refactoring from a large enum where the fields of the variants contain all the reflection info to a flat enum containing only the type kind (struct/bool/array etc). While we removed the fields of Struct, Enum and Union we forgot to take out the const eval code writing into those fields. That gave an ICE. This fixes that.
jhpratt added a commit to jhpratt/rust that referenced this pull request Oct 3, 2026
…fo, r=oli-obk

reflection: fix ICE when TypeId::info called on ADT

We are refactoring from a large enum where the fields of the variants contain all the reflection info to a flat enum containing only the type kind (struct/bool/array etc). While we removed the fields of Struct, Enum and Union we forgot to take out the const eval code writing into those fields. That gave an ICE. This fixes that.
rust-bors Bot pushed a commit that referenced this pull request Oct 3, 2026
Rollup of 6 pull requests

Successful merges:

 - #163627 (Add documentation for the `no_main` and `repr` attributes)
 - #163663 (reflection: fix ICE when TypeId::info called on ADT)
 - #138744 (Add methods to TCP and UDP sockets to modify hop limit (refresh of #94678))
 - #163633 (core: io: clean `unused_variables` lint under `no_io_statics`)
 - #163681 (Make the tracking issue template better suited for experiments)
 - #163685 (Avoid long iterator chain in all_rust_features)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Oct 3, 2026
…fo, r=oli-obk

reflection: fix ICE when TypeId::info called on ADT

We are refactoring from a large enum where the fields of the variants contain all the reflection info to a flat enum containing only the type kind (struct/bool/array etc). While we removed the fields of Struct, Enum and Union we forgot to take out the const eval code writing into those fields. That gave an ICE. This fixes that.
rust-bors Bot pushed a commit that referenced this pull request Oct 3, 2026
…uwer

Rollup of 8 pull requests

Successful merges:

 - #163645 (add `ignore-compare-mode-next-solver` to all next-solver tests)
 - #163663 (reflection: fix ICE when TypeId::info called on ADT)
 - #163454 (Improve suggestion for lifetime preceding type in generics)
 - #163561 (tests: accept noundef in a couple more places)
 - #163633 (core: io: clean `unused_variables` lint under `no_io_statics`)
 - #163681 (Make the tracking issue template better suited for experiments)
 - #163685 (Avoid long iterator chain in all_rust_features)
 - #163690 (refactor: migrate to LLVM-C's `LLVMGetOrInsertFunction`)

Failed merges:

 - #161491 (Rip out old solver coherence)
@rust-bors
rust-bors Bot merged commit df410a2 into rust-lang:main Oct 3, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 3, 2026
rust-bors Bot pushed a commit that referenced this pull request Oct 3, 2026
Rollup merge of #163663 - yara-blue:reflection-ice-typeid-info, r=oli-obk

reflection: fix ICE when TypeId::info called on ADT

We are refactoring from a large enum where the fields of the variants contain all the reflection info to a flat enum containing only the type kind (struct/bool/array etc). While we removed the fields of Struct, Enum and Union we forgot to take out the const eval code writing into those fields. That gave an ICE. This fixes that.
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-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.

5 participants