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 bool::then{,_some} functions #91917

Open
1 of 3 tasks
fee1-dead opened this issue Dec 14, 2021 · 2 comments
Open
1 of 3 tasks

Tracking Issue for const bool::then{,_some} functions #91917

fee1-dead opened this issue Dec 14, 2021 · 2 comments
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. F-const_trait_impl `#![feature(const_trait_impl)]` T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@fee1-dead
Copy link
Member

fee1-dead commented Dec 14, 2021

Feature gate: #![feature(const_bool_to_option)]

This is a tracking issue for const bool::then{,_some} functions.

See also #80967

Public API

// core::bool

impl bool {
    pub const fn then_some<T>(self, t: T) -> Option<T>
    where
        T: ~const Drop;

    pub const fn then<T, F>(self, f: F) -> Option<T>
    where
        F: ~const FnOnce() -> T,
        F: ~const Drop;
}

Steps / History

Unresolved Questions

  • None yet.
@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 Dec 14, 2021
@gimbling-away
Copy link
Contributor

gimbling-away commented Jul 27, 2022

Should this be stabilized? It doesn't seem to have had any issues since the start (Dec 2021).

@jplatte
Copy link
Contributor

jplatte commented Jul 27, 2022

I don't think APIs that use ~const bounds can be stabilized yet.

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. F-const_trait_impl `#![feature(const_trait_impl)]` 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

3 participants