Skip to content

Commit eb3c050

Browse files
committed
Fix lints
1 parent 22f50df commit eb3c050

File tree

5 files changed

+13
-2
lines changed

5 files changed

+13
-2
lines changed

crates/core_simd/src/masks/to_bitmask.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ impl_integer_intrinsic! {
7474

7575
/// Returns the minimum number of bytes in a bitmask with `lanes` lanes.
7676
#[cfg(feature = "generic_const_exprs")]
77+
#[allow(clippy::missing_inline_in_public_items)]
7778
pub const fn bitmask_len(lanes: usize) -> usize {
7879
(lanes + 7) / 8
7980
}

crates/core_simd/src/ops/shift_scalar.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ macro_rules! impl_splatted_shifts {
1010
LaneCount<N>: SupportedLaneCount,
1111
{
1212
type Output = Self;
13+
#[inline]
1314
fn $trait_fn(self, rhs: $ty) -> Self::Output {
1415
self.$trait_fn(Simd::splat(rhs))
1516
}
@@ -20,6 +21,7 @@ macro_rules! impl_splatted_shifts {
2021
LaneCount<N>: SupportedLaneCount,
2122
{
2223
type Output = Self;
24+
#[inline]
2325
fn $trait_fn(self, rhs: &$ty) -> Self::Output {
2426
self.$trait_fn(Simd::splat(*rhs))
2527
}
@@ -30,6 +32,7 @@ macro_rules! impl_splatted_shifts {
3032
LaneCount<N>: SupportedLaneCount,
3133
{
3234
type Output = Simd<$ty, N>;
35+
#[inline]
3336
fn $trait_fn(self, rhs: $ty) -> Self::Output {
3437
self.$trait_fn(Simd::splat(rhs))
3538
}
@@ -40,6 +43,7 @@ macro_rules! impl_splatted_shifts {
4043
LaneCount<N>: SupportedLaneCount,
4144
{
4245
type Output = Simd<$ty, N>;
46+
#[inline]
4347
fn $trait_fn(self, rhs: &$ty) -> Self::Output {
4448
self.$trait_fn(Simd::splat(*rhs))
4549
}

crates/core_simd/src/to_bytes.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ macro_rules! impl_to_bytes {
99
{
1010
/// Return the memory representation of this integer as a byte array in native byte
1111
/// order.
12+
#[inline]
1213
pub fn to_ne_bytes(self) -> crate::simd::Simd<u8, {{ $size * LANES }}> {
1314
// Safety: transmuting between vectors is safe
1415
unsafe { core::mem::transmute_copy(&self) }
1516
}
1617

1718
/// Return the memory representation of this integer as a byte array in big-endian
1819
/// (network) byte order.
20+
#[inline]
1921
pub fn to_be_bytes(self) -> crate::simd::Simd<u8, {{ $size * LANES }}> {
2022
let bytes = self.to_ne_bytes();
2123
if cfg!(target_endian = "big") {
@@ -27,6 +29,7 @@ macro_rules! impl_to_bytes {
2729

2830
/// Return the memory representation of this integer as a byte array in little-endian
2931
/// byte order.
32+
#[inline]
3033
pub fn to_le_bytes(self) -> crate::simd::Simd<u8, {{ $size * LANES }}> {
3134
let bytes = self.to_ne_bytes();
3235
if cfg!(target_endian = "little") {
@@ -38,12 +41,14 @@ macro_rules! impl_to_bytes {
3841

3942
/// Create a native endian integer value from its memory representation as a byte array
4043
/// in native endianness.
44+
#[inline]
4145
pub fn from_ne_bytes(bytes: crate::simd::Simd<u8, {{ $size * LANES }}>) -> Self {
4246
// Safety: transmuting between vectors is safe
4347
unsafe { core::mem::transmute_copy(&bytes) }
4448
}
4549

4650
/// Create an integer value from its representation as a byte array in big endian.
51+
#[inline]
4752
pub fn from_be_bytes(bytes: crate::simd::Simd<u8, {{ $size * LANES }}>) -> Self {
4853
let bytes = if cfg!(target_endian = "big") {
4954
bytes
@@ -54,6 +59,7 @@ macro_rules! impl_to_bytes {
5459
}
5560

5661
/// Create an integer value from its representation as a byte array in little endian.
62+
#[inline]
5763
pub fn from_le_bytes(bytes: crate::simd::Simd<u8, {{ $size * LANES }}>) -> Self {
5864
let bytes = if cfg!(target_endian = "little") {
5965
bytes

crates/core_simd/src/vendor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ macro_rules! from_transmute {
2121
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
2222
mod x86;
2323

24-
#[cfg(any(target_arch = "wasm32"))]
24+
#[cfg(target_arch = "wasm32")]
2525
mod wasm32;
2626

2727
#[cfg(any(target_arch = "aarch64", target_arch = "arm",))]

crates/core_simd/src/vendor/x86.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::simd::*;
22

3-
#[cfg(any(target_arch = "x86"))]
3+
#[cfg(target_arch = "x86")]
44
use core::arch::x86::*;
55

66
#[cfg(target_arch = "x86_64")]

0 commit comments

Comments
 (0)