Tracking Issue for likely_unlikely
and cold_path
· Issue #136873 · rust-lang/rust (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
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?