-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Consteval pointer fragment support was not properly disabled. #147959
Copy link
Copy link
Closed
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-raw-pointersArea: raw pointers, MaybeUninit, NonNullArea: raw pointers, MaybeUninit, NonNullE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-opsemRelevant to the opsem teamRelevant to the opsem team
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-raw-pointersArea: raw pointers, MaybeUninit, NonNullArea: raw pointers, MaybeUninit, NonNullE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-opsemRelevant to the opsem teamRelevant to the opsem team
Type
Fields
Give feedbackNo fields configured for issues without a type.
In #144081, pointer fragment support was enabled in consteval. Then, a bug was found in #146291, so this support was supposedly then disabled in #146324. However, it seems like this disabling was not done properly.
The below code is adapted from the previously-deleted test in https://github.com/rust-lang/rust/pull/144081/files#diff-7882729ad52694021ddccdd40fefa200d6d24ead1d586852eb4816bce32f2c6b
This code compiles in beta, but gives the following error in stable:
I am unable to reproduce the bug in #146291, but I still find it worrisome that new code was newly allowed seemingly unintentionally.
Is this operation intended to be supported in consteval?
cc @RalfJung
Meta
Tested on the playground with versions
1.91.0-beta.9 (2025-10-17 1f251978870710eb72e9)and1.90.0