Skip to content

Stabilize select_unpredictable #140550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2025
Merged
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: 1 addition & 3 deletions library/core/src/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
///
Expand All @@ -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.
Expand Down
1 change: 0 additions & 1 deletion library/coretests/tests/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
1 change: 0 additions & 1 deletion tests/codegen/intrinsics/select_unpredictable.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ compile-flags: -Copt-level=3 -Zmerge-functions=disabled

#![feature(core_intrinsics)]
#![feature(select_unpredictable)]
#![crate_type = "lib"]

/* Test the intrinsic */
Expand Down
Loading