Skip to content

Commit

Permalink
Stop using unsized_const_parameters in core/std
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxyUwU committed Jul 25, 2024
1 parent 6242470 commit c788415
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
12 changes: 0 additions & 12 deletions core/src/intrinsics/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,18 +243,6 @@ extern "rust-intrinsic" {
#[rustc_nounwind]
pub fn simd_shuffle<T, U, V>(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<T, U, const IDX: &'static [u32]>(x: T, y: T) -> U;

/// Read a vector of pointers.
///
/// `T` must be a vector.
Expand Down
1 change: 0 additions & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions core/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down

0 comments on commit c788415

Please sign in to comment.