Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking Issue for const array::from_fn #109341

Open
3 tasks
fee1-dead opened this issue Mar 19, 2023 · 0 comments
Open
3 tasks

Tracking Issue for const array::from_fn #109341

fee1-dead opened this issue Mar 19, 2023 · 0 comments
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@fee1-dead
Copy link
Member

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

@fee1-dead fee1-dead added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant