-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
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 RFCT-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.
Description
Feature gate: #![feature(const_cmp_type_id)]
This is a tracking issue for comparing TypeId
in const items.
Public API
impl const PartialEq for TypeId {}
impl const PartialOrd for TypeId {}
impl const Ord for TypeId {}
Steps / History
- Implementation: Constify
TypeId
ordering impls #101698 - Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- Making these
const
precludes some possible implementations, such as the one whereTypeId
includes a pointer to a static as proposed in TypeId: use a (v0) mangled type to remain sound in the face of hash collisions. #95845. This const-ness should not be stabilized without an explicit decision that we never want such an implementation.raldone01: I don't think adding a
'static
pointer would be a problem as the contents of the pointer would be compared and not the pointer addresses.
Footnotes
PatchMixolydic, joseluis and nrbnlulu
Metadata
Metadata
Assignees
Labels
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 RFCT-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.