-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Tracking Issue for const_heap #79597
Copy link
Copy link
Open
1 / 21 of 2 issues completedLabels
A-allocatorsArea: Custom and system allocatorsArea: Custom and system allocatorsA-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-const_heap`#[feature(const_heap)]``#[feature(const_heap)]`Libs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.needs-rfcThis change is large or controversial enough that it should have an RFC accepted before doing it.This change is large or controversial enough that it should have an RFC accepted before doing it.
Metadata
Metadata
Assignees
Labels
A-allocatorsArea: Custom and system allocatorsArea: Custom and system allocatorsA-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-const_heap`#[feature(const_heap)]``#[feature(const_heap)]`Libs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.T-langRelevant to the language teamRelevant to the language teamT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.needs-rfcThis change is large or controversial enough that it should have an RFC accepted before doing it.This change is large or controversial enough that it should have an RFC accepted before doing it.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This is a tracking issue for rust-lang/const-eval#20
The feature gate for the issue is
#![feature(const_heap)].The general design can be found here
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
Unresolved Questions
Globalallocator? This would give us post-monomorpization errors. More details can be found in https://hackmd.io/h2O2vkj3RimrBTfm9hvZWA#Transient-heap-allocations-via-Globalconst fn: before this change, aconst fn() -> Twould inevitably have to always return the same value; after this change, that is no longer the case. Withptr_guaranteed_eq, this can even to some extend be observed during CTFE. So in that sense, this feature is much bigger than anything we ever stabilized for CTFE.build.rsscripts or proc macros that generate the appropriate constants/statics and references them. Const heap will "just" make generating static/const allocations more convenient.const fn foo() -> &'static Cell<i32>, which could then be used to initialize aconst FOO: &'static Cell<i32>which is unsound (and only caught by dynamic checks). The tracking issue for interior mutability behind references is Tracking Issue forconst_refs_to_cell#80384const_make_globalcan be called twice on the same allocation.Implementation history
const_make_global; err forconst_allocateptrs if didn't call #143595