-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: 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.Relevant to the library API team, which will review and decide on the PR/issue.
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
- Intrinsic implementation: Likely unlikely fix #120370
- Reexport in
std::hint
: Reexport likely/unlikely in std::hint #133695 - Behavior improvements: improve cold_path() #133852
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- Do we want all of these functions, or only a subset?
Footnotes
PaulGrandperrin, Bowarc, Evian-Zhang, tomaka, loyd and 11 moreiago-lito, thaliaarchi, levikinva, flyingmutant and vcfxb
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: 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.Relevant to the library API team, which will review and decide on the PR/issue.