Skip to content

Commit 04cb1fa

Browse files
waywardmonkeysAmanieu
authored andcommitted
clippy: Some simple clippy fixes.
1 parent 6809280 commit 04cb1fa

File tree

4 files changed

+12
-22
lines changed

4 files changed

+12
-22
lines changed

crates/core_arch/src/aarch64/tme.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ extern "unadjusted" {
2121
#[link_name = "llvm.aarch64.tstart"]
2222
fn aarch64_tstart() -> u64;
2323
#[link_name = "llvm.aarch64.tcommit"]
24-
fn aarch64_tcommit() -> ();
24+
fn aarch64_tcommit();
2525
#[link_name = "llvm.aarch64.tcancel"]
26-
fn aarch64_tcancel(imm0: u64) -> ();
26+
fn aarch64_tcancel(imm0: u64);
2727
#[link_name = "llvm.aarch64.ttest"]
2828
fn aarch64_ttest() -> u64;
2929
}

crates/core_arch/src/wasm32/relaxed_simd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ mod tests {
307307
use super::super::simd128::*;
308308
use super::*;
309309
use core::ops::{Add, Div, Mul, Neg, Sub};
310-
use std;
310+
311311
use std::fmt::Debug;
312312
use std::mem::transmute;
313313
use std::num::Wrapping;

crates/core_arch/src/wasm32/simd128.rs

+8-18
Original file line numberDiff line numberDiff line change
@@ -3202,7 +3202,7 @@ pub fn i32x4_shr(a: v128, amt: u32) -> v128 {
32023202
#[doc(alias("i32x4.shr_u"))]
32033203
#[stable(feature = "wasm_simd", since = "1.54.0")]
32043204
pub fn u32x4_shr(a: v128, amt: u32) -> v128 {
3205-
unsafe { simd_shr(a.as_u32x4(), simd::u32x4::splat(amt as u32)).v128() }
3205+
unsafe { simd_shr(a.as_u32x4(), simd::u32x4::splat(amt)).v128() }
32063206
}
32073207

32083208
/// Adds two 128-bit vectors as if they were two packed four 32-bit integers.
@@ -4229,7 +4229,7 @@ pub fn f64x2_promote_low_f32x4(a: v128) -> v128 {
42294229
mod tests {
42304230
use super::*;
42314231
use core::ops::{Add, Div, Mul, Neg, Sub};
4232-
use std;
4232+
42334233
use std::fmt::Debug;
42344234
use std::mem::transmute;
42354235
use std::num::Wrapping;
@@ -4577,8 +4577,8 @@ mod tests {
45774577
u8::MAX.into(),
45784578
),
45794579
i16x8(
4580-
i16::MIN.into(),
4581-
i16::MAX.into(),
4580+
i16::MIN,
4581+
i16::MAX,
45824582
u16::MIN as i16,
45834583
u16::MAX as i16,
45844584
0,
@@ -4603,8 +4603,8 @@ mod tests {
46034603
u8::MAX.into(),
46044604
),
46054605
i16x8(
4606-
i16::MIN.into(),
4607-
i16::MAX.into(),
4606+
i16::MIN,
4607+
i16::MAX,
46084608
u16::MIN as i16,
46094609
u16::MAX as i16,
46104610
0,
@@ -4624,25 +4624,15 @@ mod tests {
46244624
compare_bytes(
46254625
i16x8_narrow_i32x4(
46264626
i32x4(0, -1, i16::MIN.into(), i16::MAX.into()),
4627-
i32x4(
4628-
i32::MIN.into(),
4629-
i32::MAX.into(),
4630-
u32::MIN as i32,
4631-
u32::MAX as i32,
4632-
),
4627+
i32x4(i32::MIN, i32::MAX, u32::MIN as i32, u32::MAX as i32),
46334628
),
46344629
i16x8(0, -1, i16::MIN, i16::MAX, i16::MIN, i16::MAX, 0, -1),
46354630
);
46364631

46374632
compare_bytes(
46384633
u16x8_narrow_i32x4(
46394634
i32x4(u16::MAX.into(), -1, i16::MIN.into(), i16::MAX.into()),
4640-
i32x4(
4641-
i32::MIN.into(),
4642-
i32::MAX.into(),
4643-
u32::MIN as i32,
4644-
u32::MAX as i32,
4645-
),
4635+
i32x4(i32::MIN, i32::MAX, u32::MIN as i32, u32::MAX as i32),
46464636
),
46474637
i16x8(-1, 0, 0, i16::MAX, 0, -1, 0, 0),
46484638
);

crates/core_arch/src/x86/avx.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1519,7 +1519,7 @@ pub unsafe fn _mm256_loadu_si256(mem_addr: *const __m256i) -> __m256i {
15191519
}
15201520

15211521
/// Stores 256-bits of integer data from `a` into memory.
1522-
/// `mem_addr` does not need to be aligned on any particular boundary.
1522+
/// `mem_addr` does not need to be aligned on any particular boundary.
15231523
///
15241524
/// [Intel's documentation](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_mm256_storeu_si256)
15251525
#[inline]

0 commit comments

Comments
 (0)