diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2025-05-01 13:48:11 +0100 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2025-05-01 13:49:28 +0100 |
| commit | 72b110ada38d0ebf9faf2538b9069f3b878e5625 (patch) | |
| tree | 55c857f22c89ab89a3d1baf8efeb4c835959249b | |
| parent | 6e23095adf9209614a45f7f75fea36dad7b92afb (diff) | |
| download | rust-72b110ada38d0ebf9faf2538b9069f3b878e5625.tar.gz rust-72b110ada38d0ebf9faf2538b9069f3b878e5625.zip | |
Stabilize `select_unpredictable`
FCP completed in tracking issue #133962.
| -rw-r--r-- | library/core/src/hint.rs | 4 | ||||
| -rw-r--r-- | library/coretests/tests/lib.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/intrinsics/select_unpredictable.rs | 1 |
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 */ |
