Skip to content

Tracking Issue for likely_unlikely and cold_path #136873

Open
@tgross35

Description

@tgross35

Feature gate: #![feature(likely_unlikely)], #![feature(cold_path)]

This is a tracking issue for core::hint::{likely, unlikely, cold_path}.

Please also see the meta discussion at #26179.

Public API

// core::hint

// Usable via `#![feature(cold_path)]`
pub const fn cold_path();

// Usable via `#![feature(likely_unlikely)]`
pub const fn likely(b: bool) -> bool;
pub const fn unlikely(b: bool) -> bool;

Steps / History

Unresolved Questions

  • Do we want all of these functions, or only a subset?

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