Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions library/core/src/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,6 @@ pub const fn unlikely(b: bool) -> bool {
/// # Examples
///
/// ```
/// #![feature(cold_path)]
/// use core::hint::cold_path;
///
/// fn foo(x: &[i32]) {
Expand All @@ -732,7 +731,8 @@ pub const fn unlikely(b: bool) -> bool {
/// }
/// }
/// ```
#[unstable(feature = "cold_path", issue = "136873")]
#[stable(feature = "cold_path", since = "CURRENT_RUSTC_VERSION")]
#[rustc_const_stable(feature = "cold_path", since = "CURRENT_RUSTC_VERSION")]
#[inline(always)]
pub const fn cold_path() {
crate::intrinsics::cold_path()
Expand Down
3 changes: 1 addition & 2 deletions library/core/src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,7 @@ pub const unsafe fn assume(b: bool) {
/// Therefore, implementations must not require the user to uphold
/// any safety invariants.
///
/// This intrinsic does not have a stable counterpart.
#[unstable(feature = "core_intrinsics", issue = "none")]
/// The stabilized version of this intrinsic is [`core::hint::cold_path`].
#[rustc_intrinsic]
#[rustc_nounwind]
#[miri::intrinsic_fallback_is_spec]
Expand Down
1 change: 0 additions & 1 deletion tests/codegen-llvm/hint/cold_path.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ compile-flags: -Copt-level=3
#![crate_type = "lib"]
#![feature(cold_path)]

use std::hint::cold_path;

Expand Down
Loading