Closed
Description
Feature gate: #![feature(array_len)]
This is a tracking issue for a separate length function on arrays (without coercing into slice and calling slice::len
). It allows to lower array length access into constant in MIR without any additional modifications.
Public API
// core::array
impl<T, const N: usize> [T; N] {
#[inline]
pub const fn len(&self) -> usize {
N
}
Steps / History
- Implementation: Add separate array length function #86404
- Final commenting period (FCP)
- Stabilization PR
Unresolved Questions
None so far