From 72b110ada38d0ebf9faf2538b9069f3b878e5625 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Thu, 1 May 2025 13:48:11 +0100 Subject: [PATCH] Stabilize `select_unpredictable` FCP completed in tracking issue #133962. --- library/core/src/hint.rs | 4 +--- library/coretests/tests/lib.rs | 1 - tests/codegen/intrinsics/select_unpredictable.rs | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/library/core/src/hint.rs b/library/core/src/hint.rs index 1ca23ab6eea66..394a3ea677833 100644 --- a/library/core/src/hint.rs +++ b/library/core/src/hint.rs @@ -763,8 +763,6 @@ pub const fn cold_path() { /// /// Distribute values evenly between two buckets: /// ``` -/// #![feature(select_unpredictable)] -/// /// use std::hash::BuildHasher; /// use std::hint; /// @@ -780,7 +778,7 @@ pub const fn cold_path() { /// # assert_eq!(bucket_one.len() + bucket_two.len(), 1); /// ``` #[inline(always)] -#[unstable(feature = "select_unpredictable", issue = "133962")] +#[stable(feature = "select_unpredictable", since = "CURRENT_RUSTC_VERSION")] pub fn select_unpredictable(condition: bool, true_val: T, false_val: T) -> T { // FIXME(https://github.com/rust-lang/unsafe-code-guidelines/issues/245): // Change this to use ManuallyDrop instead. diff --git a/library/coretests/tests/lib.rs b/library/coretests/tests/lib.rs index ef548971aafa1..f52e338a0850a 100644 --- a/library/coretests/tests/lib.rs +++ b/library/coretests/tests/lib.rs @@ -68,7 +68,6 @@ #![feature(pointer_is_aligned_to)] #![feature(portable_simd)] #![feature(ptr_metadata)] -#![feature(select_unpredictable)] #![feature(slice_from_ptr_range)] #![feature(slice_internals)] #![feature(slice_partition_dedup)] diff --git a/tests/codegen/intrinsics/select_unpredictable.rs b/tests/codegen/intrinsics/select_unpredictable.rs index 2db4ae174b333..ad7120c6fb8bc 100644 --- a/tests/codegen/intrinsics/select_unpredictable.rs +++ b/tests/codegen/intrinsics/select_unpredictable.rs @@ -1,7 +1,6 @@ //@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled #![feature(core_intrinsics)] -#![feature(select_unpredictable)] #![crate_type = "lib"] /* Test the intrinsic */