- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
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-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.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Description
Feature gate: #![feature(ptr_const_cast)]
This is a tracking issue for methods on pointers for casting constness without changing the type
Public API
impl<T: ?Sized> *const T {
    pub fn as_mut(self) -> *mut T;
}
impl<T: ?Sized> *mut T {
    pub fn as_const(self) -> *const T;
}Steps / History
- Implementation: Implemented const casts of raw pointers #92657
- Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- *mut Talso already has- as_mut()which does something different and has a different signature, adding a mehod of the same name to- *const Tcould be confusing, so maybe a better name should be used.- cast_const/- cast_mutwas suggested.- cast_*
madsmtm, iwanders, reitermarkus and GrayJack
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-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.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.