-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking Issue for const_pointer_is_aligned #104203
Copy link
Copy link
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.
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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Feature gate:
#![feature(const_pointer_is_aligned)]This is a tracking issue for using
ptr.is_aligned()andptr.is_aligned_to(alignment)inconstcontexts.Public API
Steps / History
is_alignedviaalign_offset#102795NonNullmethods stabilized,constness moved to this gate Stabilizenon_null_convenience#124498constfunctions to behave differently during constant-evaluation and runtime: Relax const-eval restrictions rfcs#3352Unresolved Questions
guaranteed_aligned{,to}instead?trueif the pointer is guaranteed to be aligned at runtime andfalseif we don't know whether the pointer is aligned at runtime. This is the current implementation.align_offset. This allows changes to const alignment in the future.Related Links
is_aligned: Tracking Issue for pointer_is_aligned_to #96284align_offset: Tracking Issue forconst_align_offset#90962Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩