Skip to content

Remove fields from TypeKind: Struct, Enum, Union and Tuple - #161114

Merged
rust-bors[bot] merged 9 commits into
rust-lang:mainfrom
yara-blue:remove-typekind-fields
Aug 19, 2026
Merged

Remove fields from TypeKind: Struct, Enum, Union and Tuple#161114
rust-bors[bot] merged 9 commits into
rust-lang:mainfrom
yara-blue:remove-typekind-fields

Conversation

@yara-blue

Copy link
Copy Markdown
Contributor

Tracking issue #146922

r? @oli-obk

@rustbot

Copy link
Copy Markdown
Collaborator

Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter
gets adapted for the changes, if necessary.

cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr

The reflection data structures are tied exactly to the implementation
in the compiler. Make sure to also adjust rustc_const_eval/src/const_eval/type_info.rs

cc @oli-obk

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

@rustbotrustbot 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 14, 2026
@rust-log-analyzer

This comment has been minimized.

@yara-blue
yara-blueforce-pushed the remove-typekind-fields branch from 6295e4a to f6c1ef2CompareAugust 14, 2026 23:25
Comment threadlibrary/core/src/field.rs Outdated
// We have to use the intrinsic directly instead of through `TypeId::of` as
// that would enforce a static lifetime bound on T. As that bound is there for
// the `Eq` implementation of `TypeId` it is okay for us to work around it here.
let type_id = crate::intrinsics::type_id::<T>();

@oli-obkoli-obkAug 15, 2026

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.

Ah forgot about that. Let's add a version of of that doesn't have a bound and is unstable with the type_info feature gate. My plan is getting rid of that bound anyway, or just having a dedicated method for it, so we can just add it now. Otherwise ppl will start having to use the intrinsic outside of libcore, too, which we wanna avoid even temporary

View changes since the review

@oli-obkoli-obk 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 Aug 17, 2026
@oli-obk

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-borsBot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9268e12 has been approved by oli-obk

It is now in the queue for this repository.

@rust-borsrust-borsBot 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 Aug 18, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request Aug 19, 2026
…r=oli-obk
Remove fields from TypeKind: Struct, Enum, Union and Tuple
Tracking issue rust-lang#146922
r? @oli-obk
This was referenced Aug 19, 2026
rust-borsBot pushed a commit that referenced this pull request Aug 19, 2026
Rollup of 18 pull requests
Successful merges:
- #154210 (fix: fix the capture behavior of `if let` in closures)
- #156176 (Initial implementation of `FnPtr` trait)
- #160767 (Unify E0117 foreign-trait label for ADT/primitive types with existing Slice/Array/Tuple handling)
- #161297 (std: use UNIX's `Instant` and `SystemTime` on Hermit)
- #160489 (Adding diagnostic item markers for multiple fs functions and structs)
- #160643 (Require windowed (and exception) for Xtensa ABI)
- #161088 (suppress projection errors already covered by a trait error)
- #161114 (Remove fields from TypeKind: Struct, Enum, Union and Tuple)
- #161115 (Assorted allocator nitpicks)
- #161220 (bootstrap: Allow `./x fix --allow-dirty`)
- #161296 (Enable overflow checks in `rustc_thread_pool`)
- #161298 (remove rustc_error_messages dependency)
- #161304 (Rename test so it matches the issue)
- #161309 (`allow(non_camel_case_types)` in `minicore.rs`)
- #161315 (Relax codgen test variable regex)
- #161318 (Doc: clarify how `Read::bytes` handling Interrupted errors)
- #161321 (Update books)
- #161335 ([compiletest] Use the correct rustc lib directory for query_rustc_output)
@rust-bors
rust-borsBot merged commit 6ff2141 into rust-lang:mainAug 19, 2026
13 checks passed
@rustbotrustbot added this to the 1.100.0 milestone Aug 19, 2026
rust-borsBot pushed a commit that referenced this pull request Aug 19, 2026
Rollup merge of #161114 - yara-blue:remove-typekind-fields, r=oli-obk
Remove fields from TypeKind: Struct, Enum, Union and Tuple
Tracking issue #146922
r? @oli-obk
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Aug 19, 2026
Rollup of 18 pull requests
Successful merges:
- rust-lang/rust#154210 (fix: fix the capture behavior of `if let` in closures)
- rust-lang/rust#156176 (Initial implementation of `FnPtr` trait)
- rust-lang/rust#160767 (Unify E0117 foreign-trait label for ADT/primitive types with existing Slice/Array/Tuple handling)
- rust-lang/rust#161297 (std: use UNIX's `Instant` and `SystemTime` on Hermit)
- rust-lang/rust#160489 (Adding diagnostic item markers for multiple fs functions and structs)
- rust-lang/rust#160643 (Require windowed (and exception) for Xtensa ABI)
- rust-lang/rust#161088 (suppress projection errors already covered by a trait error)
- rust-lang/rust#161114 (Remove fields from TypeKind: Struct, Enum, Union and Tuple)
- rust-lang/rust#161115 (Assorted allocator nitpicks)
- rust-lang/rust#161220 (bootstrap: Allow `./x fix --allow-dirty`)
- rust-lang/rust#161296 (Enable overflow checks in `rustc_thread_pool`)
- rust-lang/rust#161298 (remove rustc_error_messages dependency)
- rust-lang/rust#161304 (Rename test so it matches the issue)
- rust-lang/rust#161309 (`allow(non_camel_case_types)` in `minicore.rs`)
- rust-lang/rust#161315 (Relax codgen test variable regex)
- rust-lang/rust#161318 (Doc: clarify how `Read::bytes` handling Interrupted errors)
- rust-lang/rust#161321 (Update books)
- rust-lang/rust#161335 ([compiletest] Use the correct rustc lib directory for query_rustc_output)
pullBot pushed a commit to asukaminato0721/rust-analyzer that referenced this pull request Aug 20, 2026
Rollup of 18 pull requests
Successful merges:
- rust-lang/rust#154210 (fix: fix the capture behavior of `if let` in closures)
- rust-lang/rust#156176 (Initial implementation of `FnPtr` trait)
- rust-lang/rust#160767 (Unify E0117 foreign-trait label for ADT/primitive types with existing Slice/Array/Tuple handling)
- rust-lang/rust#161297 (std: use UNIX's `Instant` and `SystemTime` on Hermit)
- rust-lang/rust#160489 (Adding diagnostic item markers for multiple fs functions and structs)
- rust-lang/rust#160643 (Require windowed (and exception) for Xtensa ABI)
- rust-lang/rust#161088 (suppress projection errors already covered by a trait error)
- rust-lang/rust#161114 (Remove fields from TypeKind: Struct, Enum, Union and Tuple)
- rust-lang/rust#161115 (Assorted allocator nitpicks)
- rust-lang/rust#161220 (bootstrap: Allow `./x fix --allow-dirty`)
- rust-lang/rust#161296 (Enable overflow checks in `rustc_thread_pool`)
- rust-lang/rust#161298 (remove rustc_error_messages dependency)
- rust-lang/rust#161304 (Rename test so it matches the issue)
- rust-lang/rust#161309 (`allow(non_camel_case_types)` in `minicore.rs`)
- rust-lang/rust#161315 (Relax codgen test variable regex)
- rust-lang/rust#161318 (Doc: clarify how `Read::bytes` handling Interrupted errors)
- rust-lang/rust#161321 (Update books)
- rust-lang/rust#161335 ([compiletest] Use the correct rustc lib directory for query_rustc_output)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-libsRelevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@yara-blue@rustbot@rust-log-analyzer@oli-obk