Stop importing int/float modules

This commit is contained in:
Linus Färnstrand
2020-04-04 17:34:35 +02:00
committed by David Tolnay
parent 0b031a43df
commit e0533a30d3
6 changed files with 7 additions and 9 deletions

View File

@@ -240,7 +240,7 @@ mod tests {
arm::*, arm::*,
simd::{i16x2, i8x4, u8x4}, simd::{i16x2, i8x4, u8x4},
}; };
use std::{i32, mem::transmute}; use std::mem::transmute;
use stdarch_test::simd_test; use stdarch_test::simd_test;
#[test] #[test]

View File

@@ -464,7 +464,7 @@ pub unsafe fn __usada8(a: int8x4_t, b: int8x4_t, c: u32) -> u32 {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use crate::core_arch::simd::{i16x2, i8x4, u8x4}; use crate::core_arch::simd::{i16x2, i8x4, u8x4};
use std::{i16, i8, mem::transmute}; use std::mem::transmute;
use stdarch_test::simd_test; use stdarch_test::simd_test;
#[test] #[test]

View File

@@ -1141,7 +1141,7 @@ pub unsafe fn vtbx4_p8(a: poly8x8_t, b: poly8x8x4_t, c: uint8x8_t) -> poly8x8_t
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use crate::core_arch::{arm::*, simd::*}; use crate::core_arch::{arm::*, simd::*};
use std::{i16, i32, i8, mem::transmute, u16, u32, u8}; use std::mem::transmute;
use stdarch_test::simd_test; use stdarch_test::simd_test;
#[simd_test(enable = "neon")] #[simd_test(enable = "neon")]

View File

@@ -5229,7 +5229,6 @@ mod tests {
#[simd_test(enable = "sse2,mmx")] #[simd_test(enable = "sse2,mmx")]
unsafe fn test_mm_cvttpd_pi32() { unsafe fn test_mm_cvttpd_pi32() {
use std::{f64, i32};
let a = _mm_setr_pd(5., 0.); let a = _mm_setr_pd(5., 0.);
let r = _mm_cvttpd_pi32(a); let r = _mm_cvttpd_pi32(a);

View File

@@ -71,7 +71,6 @@ pub unsafe fn _mm_cvtsi64_ss(a: __m128, b: i64) -> __m128 {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use crate::core_arch::arch::x86_64::*; use crate::core_arch::arch::x86_64::*;
use std::{f32::NAN, i64::MIN};
use stdarch_test::simd_test; use stdarch_test::simd_test;
#[simd_test(enable = "sse")] #[simd_test(enable = "sse")]
@@ -83,7 +82,7 @@ mod tests {
(-34.5, -34), (-34.5, -34),
(4.0e10, 40_000_000_000), (4.0e10, 40_000_000_000),
(4.0e-10, 0), (4.0e-10, 0),
(NAN, MIN), (f32::NAN, i64::MIN),
(2147483500.1, 2147483520), (2147483500.1, 2147483520),
(9.223371e18, 9223370937343148032), (9.223371e18, 9223370937343148032),
]; ];
@@ -110,10 +109,10 @@ mod tests {
(-5.99, -5), (-5.99, -5),
(4.0e10, 40_000_000_000), (4.0e10, 40_000_000_000),
(4.0e-10, 0), (4.0e-10, 0),
(NAN, MIN), (f32::NAN, i64::MIN),
(2147483500.1, 2147483520), (2147483500.1, 2147483520),
(9.223371e18, 9223370937343148032), (9.223371e18, 9223370937343148032),
(9.223372e18, MIN), (9.223372e18, i64::MIN),
]; ];
for i in 0..inputs.len() { for i in 0..inputs.len() {
let (xi, e) = inputs[i]; let (xi, e) = inputs[i];

View File

@@ -148,7 +148,7 @@ pub unsafe fn _mm_cvtsi64x_sd(a: __m128d, b: i64) -> __m128d {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use crate::core_arch::arch::x86_64::*; use crate::core_arch::arch::x86_64::*;
use std::{boxed, f64, i64}; use std::boxed;
use stdarch_test::simd_test; use stdarch_test::simd_test;
#[simd_test(enable = "sse2")] #[simd_test(enable = "sse2")]