Skip to content

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

Closed

Description

@fee1-dead

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.

Activity

  1. added
    T-libs-api[DEPRECATED; DO NOT USE]
    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
    on Dec 14, 2021
  2. jplatte commented on Jul 27, 2022

    @jplatte
    Contributor

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

  3. RalfJung commented on Sep 8, 2024

    @RalfJung
    Member

    This got removed by #110393.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCF-const_trait_impl`#![feature(const_trait_impl)]`T-libs-api[DEPRECATED; DO NOT USE]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions