Skip to content

Tracking Issue for const array::from_fn #109341

Open
@fee1-dead

Description

@fee1-dead

Feature gate: #![feature(const_array_from_fn)]

This is a tracking issue for using array::from_fn in const contexts

Public API

// core::array

pub const fn from_fn<T, const N: usize, F>(cb: F) -> [T; N]
where
    F: ~const FnMut(usize) -> T + ~const Destruct,
    T: ~const Destruct;
   
pub const fn try_from_fn<R, const N: usize, F>(cb: F) -> ChangeOutputType<R, [R::Output; N]>
where
    F: ~const FnMut(usize) -> R + ~const Destruct,
    R: ~const Try,
    R::Residual: ~const Residual<[R::Output; N]>,
    R::Output: ~const Destruct;

Steps / History

Unresolved Questions

  • None yet.

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 RFCT-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