-
Notifications
You must be signed in to change notification settings - Fork 14k
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.
Description
Feature gate: #![feature(const_align_offset)]
This is a tracking issue for <*const _>::align_offset and <*mut _>::align_offset functions marked as const fn
Public API
impl<T> *const T {
pub const fn align_offset(self, align: usize) -> usize;
}
impl<T> *mut T {
pub const fn align_offset(self, align: usize) -> usize;
}
impl <T> NonNull<T> {
pub const fn align_offset(self, align: usize) -> usize;
}Steps / History
- Implementation: Mark
<*const _>::align_offsetand<*mut _>::align_offsetasconst fn#90958 -
NonNullmethods stabilized,constness moved to this gate Stabilizenon_null_convenience#124498 - Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- Is it fine to always return
usize::MAXat compile time? This allows to distinguish compiletime and runtime function execution, see Make slice->str conversion and related functionsconst#90607 (comment)
orzogc and tuguzT
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.