Open
Description
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
- Implementation: Reexport likely/unlikely in std::hint #133695
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- Do we want all of these functions, or only a subset?