From c788415b02565637b71bd662a9bfd77f3d9208c8 Mon Sep 17 00:00:00 2001 From: Boxy Date: Thu, 25 Jul 2024 19:47:12 +0100 Subject: [PATCH] Stop using `unsized_const_parameters` in core/std --- core/src/intrinsics/simd.rs | 12 ------------ core/src/lib.rs | 1 - core/src/marker.rs | 2 ++ 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/core/src/intrinsics/simd.rs b/core/src/intrinsics/simd.rs index 30734c020b39..0c21e6f31a82 100644 --- a/core/src/intrinsics/simd.rs +++ b/core/src/intrinsics/simd.rs @@ -243,18 +243,6 @@ extern "rust-intrinsic" { #[rustc_nounwind] pub fn simd_shuffle(x: T, y: T, idx: U) -> V; - /// Shuffle two vectors by const indices. - /// - /// `T` must be a vector. - /// - /// `U` must be a vector with the same element type as `T` and the same length as `IDX`. - /// - /// Returns a new vector such that element `i` is selected from `xy[IDX[i]]`, where `xy` - /// is the concatenation of `x` and `y`. It is a compile-time error if `IDX[i]` is out-of-bounds - /// of `xy`. - #[rustc_nounwind] - pub fn simd_shuffle_generic(x: T, y: T) -> U; - /// Read a vector of pointers. /// /// `T` must be a vector. diff --git a/core/src/lib.rs b/core/src/lib.rs index 0ec46412e952..02cb02dce1d8 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -249,7 +249,6 @@ #![feature(transparent_unions)] #![feature(try_blocks)] #![feature(unboxed_closures)] -#![feature(unsized_const_params)] #![feature(unsized_fn_params)] #![feature(with_negative_coherence)] // tidy-alphabetical-end diff --git a/core/src/marker.rs b/core/src/marker.rs index a87528033c03..cf428e36ea7a 100644 --- a/core/src/marker.rs +++ b/core/src/marker.rs @@ -42,6 +42,8 @@ use crate::hash::Hasher; /// } /// ``` #[unstable(feature = "internal_impls_macro", issue = "none")] +// Allow implementations of `UnsizedConstParamTy` even though std cannot use that feature. +#[allow_internal_unstable(unsized_const_params)] macro marker_impls { ( $(#[$($meta:tt)*])* $Trait:ident for $({$($bounds:tt)*})? $T:ty $(, $($rest:tt)*)? ) => { $(#[$($meta)*])* impl< $($($bounds)*)? > $Trait for $T {}