Skip to content

Commit

Permalink
Merge pull request #451 from ehuss/rust-2024
Browse files Browse the repository at this point in the history
Migrate core_simd to Rust 2024
  • Loading branch information
calebzulawski authored Feb 13, 2025
2 parents 3383cfb + 007e0f1 commit b4f4785
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 14 deletions.
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

0 comments on commit b4f4785

Please sign in to comment.