Tracking Issue for raw array getters (array_ptr_get)
Open
Nobody has claimed this yet.
C-tracking-issue
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Feature gate: #![feature(array_ptr_get)]
This is a tracking issue for as_(mut_)ptr and as_(mut_)slice methods on raw array pointers, i.e. *(const/mut) [T; N].
See also:
- Similar methods for raw slices: https://github.com/rust-lang/rust/issues/74265
Public API
impl<T, const N: usize> *mut [T; N] {
pub fn as_mut_ptr(self) -> *mut T {}
pub fn as_mut_slice(self) -> *mut [T] {}
}
impl<T, const N: usize> *const [T; N] {
pub const fn as_ptr(self) -> *const T {}
pub const fn as_slice(self) -> *const [T] {}
}
Steps / History
- ACP: https://github.com/rust-lang/libs-team/issues/321
- Implementation: #119411
- Final comment period (FCP)^1
- Stabilization PR
Unresolved Questions
- If arbitrary_self_types (https://github.com/rust-lang/rfcs/pull/3519) is accepted, these methods may be changed to have a
*(const/mut) Selfreceiver. Also, if a deref-like coercion mechanism is added (specifically,*[T; N]->*[T], similar to the non-raw counterparts), these methods might become redundant.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the feature-gated API and the completed implementation in #119411, then read the linked stabilization guidance and the unresolved questions. Done means completing the remaining final comment period and stabilization PR steps for array_ptr_get.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100