Skip to content

Tracking Issue for const_array #147606

@bend-n

Description

@bend-n

Feature gate: #![feature(const_array)]

This is a tracking issue for const [T]::map and array::from_fn.

Public API

// core::array
impl<T, const N: usize> [T; N] {
    pub const fn map<F, U>(self, f: F) -> [U; N]
    where
        F: [const] FnMut(T) -> U + [const] Destruct,
        U: [const] Destruct;
}

pub const fn from_fn<T: [const] Destruct, const N: usize, F>(f: F) -> [T; N]
where
    F: [const] FnMut(usize) -> T + [const] Destruct;

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Unresolved Questions

  • Should array::try_map be constified

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions