Skip to content

Tracking Issue for const_bool #151531

Open
Open

Description

@bend-n

Feature gate: #![feature(const_bool)]

This is a tracking issue for constified boolean methods.

Public API

// core::bool

impl bool {
    pub const fn then_some<T: [const] Destruct>(self, t: T) -> Option<T>;
    pub const fn then<T, F: [const] FnOnce() -> T + [const] Destruct>(self, f: F) -> Option<T>;
    pub const fn ok_or<E: [const] Destruct>(self, err: E) -> Result<(), E>;
    pub const fn ok_or_else<E, F: [const] FnOnce() -> E + [const] Destruct>;
}

Steps / History

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

Unresolved Questions

  • None yet.

Footnotes

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

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 Jan 23, 2026
  2. akhilamalakota commented on Jan 24, 2026

    @akhilamalakota

    I'd like to work on it!

  3. SpriteOvO commented on Jan 24, 2026

    @SpriteOvO
    Member

    Hi @akhilamalakota, the implementation of this feature gate has been merged, and no further work needs to be done here. Since its implementation was merged shortly ago, it will take some time before stabilizing it. You can try them out in nightly channel and open an issue if you discover any potential problems -- this is what needs to be done before stabilizing them.

  4. added
    T-libsRelevant to the library team, which will review and decide on the PR/issue.
    and removed
    T-libs-api[DEPRECATED; DO NOT USE]
    on Aug 12, 2026
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 RFCT-libsRelevant to the library 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