-
-
Notifications
You must be signed in to change notification settings - Fork 16.1k
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-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
Description
Activity
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-api[DEPRECATED; DO NOT USE][DEPRECATED; DO NOT USE]
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 ↩