about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2025-05-01 13:48:11 +0100
committerAmanieu d'Antras <amanieu@gmail.com>2025-05-01 13:49:28 +0100
commit72b110ada38d0ebf9faf2538b9069f3b878e5625 (patch)
tree55c857f22c89ab89a3d1baf8efeb4c835959249b
parent6e23095adf9209614a45f7f75fea36dad7b92afb (diff)
downloadrust-72b110ada38d0ebf9faf2538b9069f3b878e5625.tar.gz
rust-72b110ada38d0ebf9faf2538b9069f3b878e5625.zip
Stabilize `select_unpredictable`
FCP completed in tracking issue #133962.
-rw-r--r--library/core/src/hint.rs4
-rw-r--r--library/coretests/tests/lib.rs1
-rw-r--r--tests/codegen/intrinsics/select_unpredictable.rs1
3 files changed, 1 insertions, 5 deletions
diff --git a/library/core/src/hint.rs b/library/core/src/hint.rs
index 1ca23ab6eea..394a3ea6778 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<T>(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 ef548971aaf..f52e338a085 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 2db4ae174b3..ad7120c6fb8 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 */