-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
B-experimentalBlocker: In-tree experiment; RFC pending, not yet approved or unneeded (requires FCP to stabilize).Blocker: In-tree experiment; RFC pending, not yet approved or unneeded (requires FCP to stabilize).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 RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.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 team
Description
This is a tracking issue for an un-RFC-ed language feature experiment
The feature gate for the issue is #![feature(reflection)]
.
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.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
- Implement an MVP (@oli-obk will do so)Discuss with the lang teamWrite an RFCAdjust documentation (see instructions on rustc-dev-guide)Style updates for any new syntax (nightly-style-procedure)
- Style team decision on new formatting
- Formatting for new syntax has been added to the Style Guide
- (non-blocking) Formatting has been implemented in
rustfmt
To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.Stabilization PR (see instructions on rustc-dev-guide)To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Unresolved Questions
- should we even do this at all? Reflection allows causing monomorphization time errors similar to
const { assert!(size_of::<T>(), 5) }
, but for much more fine-grained details of a generic parameterT
. - Is something lifetime-aware even possible at all?
- Should we use a non-const-eval based scheme (const generics based or even proc macro based?)
Implementation history
- first (not salvageable) prototype: https://rust-lang.zulipchat.com/#narrow/channel/427678-t-lang.2Finterop/topic/type.20layout.20import.2Fexport/near/505722852
MolotovCherry, Phosphorus-M and CyanChangesMolotovCherry, izagawd and Phosphorus-Mlqd, terrarier2111, kamulos, mejrs, loncothad and 14 morethe8472, jieyouxu, juntyr, y21, janhohenheim and 7 more
Metadata
Metadata
Assignees
Labels
B-experimentalBlocker: In-tree experiment; RFC pending, not yet approved or unneeded (requires FCP to stabilize).Blocker: In-tree experiment; RFC pending, not yet approved or unneeded (requires FCP to stabilize).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 RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.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 team
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity