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

clippy: Some simple clippy fixes. #1451

Merged
merged 1 commit into from
Jul 30, 2023
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
4 changes: 2 additions & 2 deletions crates/core_arch/src/aarch64/tme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ extern "unadjusted" {
#[link_name = "llvm.aarch64.tstart"]
fn aarch64_tstart() -> u64;
#[link_name = "llvm.aarch64.tcommit"]
fn aarch64_tcommit() -> ();
fn aarch64_tcommit();
#[link_name = "llvm.aarch64.tcancel"]
fn aarch64_tcancel(imm0: u64) -> ();
fn aarch64_tcancel(imm0: u64);
#[link_name = "llvm.aarch64.ttest"]
fn aarch64_ttest() -> u64;
}
Expand Down
2 changes: 1 addition & 1 deletion crates/core_arch/src/wasm32/relaxed_simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ mod tests {
use super::super::simd128::*;
use super::*;
use core::ops::{Add, Div, Mul, Neg, Sub};
use std;

use std::fmt::Debug;
use std::mem::transmute;
use std::num::Wrapping;
Expand Down
26 changes: 8 additions & 18 deletions crates/core_arch/src/wasm32/simd128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3202,7 +3202,7 @@ pub fn i32x4_shr(a: v128, amt: u32) -> v128 {
#[doc(alias("i32x4.shr_u"))]
#[stable(feature = "wasm_simd", since = "1.54.0")]
pub fn u32x4_shr(a: v128, amt: u32) -> v128 {
unsafe { simd_shr(a.as_u32x4(), simd::u32x4::splat(amt as u32)).v128() }
unsafe { simd_shr(a.as_u32x4(), simd::u32x4::splat(amt)).v128() }
}

/// Adds two 128-bit vectors as if they were two packed four 32-bit integers.
Expand Down Expand Up @@ -4229,7 +4229,7 @@ pub fn f64x2_promote_low_f32x4(a: v128) -> v128 {
mod tests {
use super::*;
use core::ops::{Add, Div, Mul, Neg, Sub};
use std;

use std::fmt::Debug;
use std::mem::transmute;
use std::num::Wrapping;
Expand Down Expand Up @@ -4577,8 +4577,8 @@ mod tests {
u8::MAX.into(),
),
i16x8(
i16::MIN.into(),
i16::MAX.into(),
i16::MIN,
i16::MAX,
u16::MIN as i16,
u16::MAX as i16,
0,
Expand All @@ -4603,8 +4603,8 @@ mod tests {
u8::MAX.into(),
),
i16x8(
i16::MIN.into(),
i16::MAX.into(),
i16::MIN,
i16::MAX,
u16::MIN as i16,
u16::MAX as i16,
0,
Expand All @@ -4624,25 +4624,15 @@ mod tests {
compare_bytes(
i16x8_narrow_i32x4(
i32x4(0, -1, i16::MIN.into(), i16::MAX.into()),
i32x4(
i32::MIN.into(),
i32::MAX.into(),
u32::MIN as i32,
u32::MAX as i32,
),
i32x4(i32::MIN, i32::MAX, u32::MIN as i32, u32::MAX as i32),
),
i16x8(0, -1, i16::MIN, i16::MAX, i16::MIN, i16::MAX, 0, -1),
);

compare_bytes(
u16x8_narrow_i32x4(
i32x4(u16::MAX.into(), -1, i16::MIN.into(), i16::MAX.into()),
i32x4(
i32::MIN.into(),
i32::MAX.into(),
u32::MIN as i32,
u32::MAX as i32,
),
i32x4(i32::MIN, i32::MAX, u32::MIN as i32, u32::MAX as i32),
),
i16x8(-1, 0, 0, i16::MAX, 0, -1, 0, 0),
);
Expand Down
2 changes: 1 addition & 1 deletion crates/core_arch/src/x86/avx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ pub unsafe fn _mm256_loadu_si256(mem_addr: *const __m256i) -> __m256i {
}

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