Reflection refactor ptrs - #162294
Merged
rust-bors[bot] merged 6 commits intoSep 7, 2026
Merged
Reflection refactor ptrs#162294
Conversation
Collaborator
|
Some changes occurred to the intrinsics. Make sure the CTFE / Miri interpreter cc @rust-lang/miri, @RalfJung, @oli-obk, @lcnr The reflection data structures are tied exactly to the implementation cc @oli-obk Some changes occurred to the CTFE machinery Some changes occurred in compiler/rustc_attr_ir |
Collaborator
|
|
yara-blue
commented
Sep 4, 2026
yara-blue
commented
Sep 4, 2026
yara-blue
force-pushed
the
reflection-refactor-ptrs
branch
2 times, most recently
from
September 4, 2026 13:21
52f2e49 to
b9b9421
Compare
yara-blue
commented
Sep 4, 2026
Contributor
Author
There was a problem hiding this comment.
I originally did a straightforward port of these tests but decided to "uncouple" (testing only one "thing" per test) them also. Happy rewrite as a straightforward port.
This comment has been minimized.
This comment has been minimized.
yara-blue
force-pushed
the
reflection-refactor-ptrs
branch
from
September 4, 2026 17:28
b9b9421 to
06fa642
Compare
oli-obk
reviewed
Sep 7, 2026
Contributor
|
@bors r+ rollup |
Contributor
This was referenced Sep 7, 2026
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 7, 2026
…uwer Rollup of 3 pull requests Successful merges: - #161896 (Remove fields from TypeKind: Array, Slice) - #162354 (Make comptime functions ineligible for coverage) - #162379 (add test ensuring we refuse to const-eval the body of a rustc_do_not_const_check function) Failed merges: - #162294 (Reflection refactor ptrs)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Sep 7, 2026
…, r=oli-obk Reflection refactor ptrs Tracking issue rust-lang#146922 Part of the [Refactoring to many methods](https://rust-lang.zulipchat.com/#narrow/channel/572285-goals.2Freflection/topic/Refactoring.20to.20many.20methods/with/592226560) reflection subgoal. See that for the full context. In short for various reasons we are moving from an enum `TypeKind` where the variants hold the types information to one that just tells you the type kind. Separate methods on `TypeId` provide a way to get to the data that used to be in the variant. Since function pointers have a lot of fields it felt better to keep the `FnPtr` struct we have now then add an intrinsic for each field. r? @oli-obk
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Sep 7, 2026
…, r=oli-obk Reflection refactor ptrs Tracking issue rust-lang#146922 Part of the [Refactoring to many methods](https://rust-lang.zulipchat.com/#narrow/channel/572285-goals.2Freflection/topic/Refactoring.20to.20many.20methods/with/592226560) reflection subgoal. See that for the full context. In short for various reasons we are moving from an enum `TypeKind` where the variants hold the types information to one that just tells you the type kind. Separate methods on `TypeId` provide a way to get to the data that used to be in the variant. Since function pointers have a lot of fields it felt better to keep the `FnPtr` struct we have now then add an intrinsic for each field. r? @oli-obk
This was referenced Sep 7, 2026
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 7, 2026
…uwer Rollup of 11 pull requests Successful merges: - #158153 (avoid spurious lifetime diagnostic in async generic case) - #160197 (Restrict LLVM inline asm location cookie usage. Fixes #150451) - #162413 (Unconditionally invalidate the library when the compiler changes) - #162294 (Reflection refactor ptrs) - #162354 (Make comptime functions ineligible for coverage) - #162379 (add test ensuring we refuse to const-eval the body of a rustc_do_not_const_check function) - #162386 (Add a regression test for trailing attributes in doctests) - #162410 (std: remove exceed whitespace in docs) - #162420 (mir_build: Don't pass a redundant `scrutinee_span` to some MIR-build methods) - #162430 (rustc-dev-guide subtree update) - #162431 (add next-solver FIXMEs)
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 7, 2026
Rollup merge of #162294 - yara-blue:reflection-refactor-ptrs, r=oli-obk Reflection refactor ptrs Tracking issue #146922 Part of the [Refactoring to many methods](https://rust-lang.zulipchat.com/#narrow/channel/572285-goals.2Freflection/topic/Refactoring.20to.20many.20methods/with/592226560) reflection subgoal. See that for the full context. In short for various reasons we are moving from an enum `TypeKind` where the variants hold the types information to one that just tells you the type kind. Separate methods on `TypeId` provide a way to get to the data that used to be in the variant. Since function pointers have a lot of fields it felt better to keep the `FnPtr` struct we have now then add an intrinsic for each field. r? @oli-obk
github-actions Bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Sep 14, 2026
…uwer Rollup of 11 pull requests Successful merges: - rust-lang/rust#158153 (avoid spurious lifetime diagnostic in async generic case) - rust-lang/rust#160197 (Restrict LLVM inline asm location cookie usage. Fixes rust-lang/rust#150451) - rust-lang/rust#162413 (Unconditionally invalidate the library when the compiler changes) - rust-lang/rust#162294 (Reflection refactor ptrs) - rust-lang/rust#162354 (Make comptime functions ineligible for coverage) - rust-lang/rust#162379 (add test ensuring we refuse to const-eval the body of a rustc_do_not_const_check function) - rust-lang/rust#162386 (Add a regression test for trailing attributes in doctests) - rust-lang/rust#162410 (std: remove exceed whitespace in docs) - rust-lang/rust#162420 (mir_build: Don't pass a redundant `scrutinee_span` to some MIR-build methods) - rust-lang/rust#162430 (rustc-dev-guide subtree update) - rust-lang/rust#162431 (add next-solver FIXMEs)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracking issue #146922
Part of the Refactoring to many methods reflection subgoal. See that for the full context. In short for various reasons we are moving from an enum
TypeKindwhere the variants hold the types information to one that just tells you the type kind. Separate methods onTypeIdprovide a way to get to the data that used to be in the variant.Since function pointers have a lot of fields it felt better to keep the
FnPtrstruct we have now then add an intrinsic for each field.r? @oli-obk