Skip to content
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

Migrate core_simd to Rust 2024 #451

Merged
merged 2 commits into from
Feb 13, 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
2 changes: 1 addition & 1 deletion crates/core_simd/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "core_simd"
version = "0.1.0"
edition = "2021"
edition = "2024"
homepage = "https://github.com/rust-lang/portable-simd"
repository = "https://github.com/rust-lang/portable-simd"
keywords = ["core", "simd", "intrinsics"]
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/ops.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::simd::{cmp::SimdPartialEq, LaneCount, Simd, SimdElement, SupportedLaneCount};
use crate::simd::{LaneCount, Simd, SimdElement, SupportedLaneCount, cmp::SimdPartialEq};
use core::ops::{Add, Mul};
use core::ops::{BitAnd, BitOr, BitXor};
use core::ops::{Div, Rem, Sub};
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/simd/cmp/eq.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::simd::{
ptr::{SimdConstPtr, SimdMutPtr},
LaneCount, Mask, Simd, SimdElement, SupportedLaneCount,
ptr::{SimdConstPtr, SimdMutPtr},
};

/// Parallel `PartialEq`.
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/simd/cmp/ord.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::simd::{
LaneCount, Mask, Simd, SupportedLaneCount,
cmp::SimdPartialEq,
ptr::{SimdConstPtr, SimdMutPtr},
LaneCount, Mask, Simd, SupportedLaneCount,
};

/// Parallel `PartialOrd`.
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/simd/num/float.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::sealed::Sealed;
use crate::simd::{
cmp::{SimdPartialEq, SimdPartialOrd},
LaneCount, Mask, Simd, SimdCast, SimdElement, SupportedLaneCount,
cmp::{SimdPartialEq, SimdPartialOrd},
};

/// Operations on SIMD vectors of floats.
Expand Down
4 changes: 2 additions & 2 deletions crates/core_simd/src/simd/num/int.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::sealed::Sealed;
use crate::simd::{
cmp::SimdOrd, cmp::SimdPartialOrd, num::SimdUint, LaneCount, Mask, Simd, SimdCast, SimdElement,
SupportedLaneCount,
LaneCount, Mask, Simd, SimdCast, SimdElement, SupportedLaneCount, cmp::SimdOrd,
cmp::SimdPartialOrd, num::SimdUint,
};

/// Operations on SIMD vectors of signed integers.
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/simd/num/uint.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::sealed::Sealed;
use crate::simd::{cmp::SimdOrd, LaneCount, Simd, SimdCast, SimdElement, SupportedLaneCount};
use crate::simd::{LaneCount, Simd, SimdCast, SimdElement, SupportedLaneCount, cmp::SimdOrd};

/// Operations on SIMD vectors of unsigned integers.
pub trait SimdUint: Copy + Sealed {
Expand Down
3 changes: 2 additions & 1 deletion crates/core_simd/src/simd/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@

#[doc(no_inline)]
pub use super::{
Mask, Simd,
cmp::{SimdOrd, SimdPartialEq, SimdPartialOrd},
num::{SimdFloat, SimdInt, SimdUint},
ptr::{SimdConstPtr, SimdMutPtr},
simd_swizzle, Mask, Simd,
simd_swizzle,
};

#[rustfmt::skip]
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/simd/ptr/const_ptr.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::sealed::Sealed;
use crate::simd::{cmp::SimdPartialEq, num::SimdUint, LaneCount, Mask, Simd, SupportedLaneCount};
use crate::simd::{LaneCount, Mask, Simd, SupportedLaneCount, cmp::SimdPartialEq, num::SimdUint};

/// Operations on SIMD vectors of constant pointers.
pub trait SimdConstPtr: Copy + Sealed {
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/simd/ptr/mut_ptr.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::sealed::Sealed;
use crate::simd::{cmp::SimdPartialEq, num::SimdUint, LaneCount, Mask, Simd, SupportedLaneCount};
use crate::simd::{LaneCount, Mask, Simd, SupportedLaneCount, cmp::SimdPartialEq, num::SimdUint};

/// Operations on SIMD vectors of mutable pointers.
pub trait SimdMutPtr: Copy + Sealed {
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/to_bytes.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::simd::{
num::{SimdFloat, SimdInt, SimdUint},
LaneCount, Simd, SimdElement, SupportedLaneCount,
num::{SimdFloat, SimdInt, SimdUint},
};

mod sealed {
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/src/vector.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::simd::{
LaneCount, Mask, MaskElement, SupportedLaneCount, Swizzle,
cmp::SimdPartialOrd,
num::SimdUint,
ptr::{SimdConstPtr, SimdMutPtr},
LaneCount, Mask, MaskElement, SupportedLaneCount, Swizzle,
};

/// A SIMD vector with the shape of `[T; N]` but the operations of `T`.
Expand Down
2 changes: 1 addition & 1 deletion crates/core_simd/tests/pointers.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![feature(portable_simd)]

use core_simd::simd::{
ptr::{SimdConstPtr, SimdMutPtr},
Simd,
ptr::{SimdConstPtr, SimdMutPtr},
};

macro_rules! common_tests {
Expand Down