diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2022-07-20 18:08:14 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2022-07-20 18:08:20 -0700 |
| commit | f8aa494c69d2298e9f2b995eb07d279005f3fc40 (patch) | |
| tree | 6a0a69fb2f83ebbe71afea6fa8801d0aa4ba6c9d | |
| parent | a14404a028943f9d59c881a32b09dd5cae909498 (diff) | |
| download | rust-f8aa494c69d2298e9f2b995eb07d279005f3fc40.tar.gz rust-f8aa494c69d2298e9f2b995eb07d279005f3fc40.zip | |
Introduce core::simd trait imports in tests
| -rw-r--r-- | library/core/src/slice/mod.rs | 1 | ||||
| -rw-r--r-- | library/core/tests/simd.rs | 1 | ||||
| -rw-r--r-- | src/test/codegen/simd-wide-sum.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/simd/libm_no_std_cant_float.rs | 1 | ||||
| -rw-r--r-- | src/test/ui/simd/libm_no_std_cant_float.stderr | 12 | ||||
| -rw-r--r-- | src/test/ui/simd/libm_std_can_float.rs | 2 |
6 files changed, 11 insertions, 8 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 77fd1ec2b8e..6d9e58822c0 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -3569,6 +3569,7 @@ impl<T> [T] { /// /// ``` /// #![feature(portable_simd)] + /// use core::simd::SimdFloat; /// /// let short = &[1, 2, 3]; /// let (prefix, middle, suffix) = short.as_simd::<4>(); diff --git a/library/core/tests/simd.rs b/library/core/tests/simd.rs index 5b516a72360..565c8975eb9 100644 --- a/library/core/tests/simd.rs +++ b/library/core/tests/simd.rs @@ -1,4 +1,5 @@ use core::simd::f32x4; +use core::simd::SimdFloat; #[test] fn testing() { diff --git a/src/test/codegen/simd-wide-sum.rs b/src/test/codegen/simd-wide-sum.rs index 015ac4fe4d1..04314dc291a 100644 --- a/src/test/codegen/simd-wide-sum.rs +++ b/src/test/codegen/simd-wide-sum.rs @@ -5,7 +5,7 @@ #![crate_type = "lib"] #![feature(portable_simd)] -use std::simd::Simd; +use std::simd::{Simd, SimdUint}; const N: usize = 8; #[no_mangle] diff --git a/src/test/ui/simd/libm_no_std_cant_float.rs b/src/test/ui/simd/libm_no_std_cant_float.rs index abe460a326b..50ac8e20839 100644 --- a/src/test/ui/simd/libm_no_std_cant_float.rs +++ b/src/test/ui/simd/libm_no_std_cant_float.rs @@ -2,6 +2,7 @@ #![no_std] #![feature(portable_simd)] use core::simd::f32x4; +use core::simd::SimdFloat; // For SIMD float ops, the LLIR version which is used to implement the portable // forms of them may become calls to math.h AKA libm. So, we can't guarantee diff --git a/src/test/ui/simd/libm_no_std_cant_float.stderr b/src/test/ui/simd/libm_no_std_cant_float.stderr index dc8638f6ab7..b4ae57eb74e 100644 --- a/src/test/ui/simd/libm_no_std_cant_float.stderr +++ b/src/test/ui/simd/libm_no_std_cant_float.stderr @@ -1,35 +1,35 @@ error[E0599]: no method named `ceil` found for struct `Simd` in the current scope - --> $DIR/libm_no_std_cant_float.rs:14:17 + --> $DIR/libm_no_std_cant_float.rs:15:17 | LL | let _xc = x.ceil(); | ^^^^ method not found in `Simd<f32, 4_usize>` error[E0599]: no method named `floor` found for struct `Simd` in the current scope - --> $DIR/libm_no_std_cant_float.rs:15:17 + --> $DIR/libm_no_std_cant_float.rs:16:17 | LL | let _xf = x.floor(); | ^^^^^ method not found in `Simd<f32, 4_usize>` error[E0599]: no method named `round` found for struct `Simd` in the current scope - --> $DIR/libm_no_std_cant_float.rs:16:17 + --> $DIR/libm_no_std_cant_float.rs:17:17 | LL | let _xr = x.round(); | ^^^^^ method not found in `Simd<f32, 4_usize>` error[E0599]: no method named `trunc` found for struct `Simd` in the current scope - --> $DIR/libm_no_std_cant_float.rs:17:17 + --> $DIR/libm_no_std_cant_float.rs:18:17 | LL | let _xt = x.trunc(); | ^^^^^ method not found in `Simd<f32, 4_usize>` error[E0599]: no method named `mul_add` found for struct `Simd` in the current scope - --> $DIR/libm_no_std_cant_float.rs:18:19 + --> $DIR/libm_no_std_cant_float.rs:19:19 | LL | let _xfma = x.mul_add(x, x); | ^^^^^^^ method not found in `Simd<f32, 4_usize>` error[E0599]: no method named `sqrt` found for struct `Simd` in the current scope - --> $DIR/libm_no_std_cant_float.rs:19:20 + --> $DIR/libm_no_std_cant_float.rs:20:20 | LL | let _xsqrt = x.sqrt(); | ^^^^ method not found in `Simd<f32, 4_usize>` diff --git a/src/test/ui/simd/libm_std_can_float.rs b/src/test/ui/simd/libm_std_can_float.rs index 6a844e7120e..1c520856e98 100644 --- a/src/test/ui/simd/libm_std_can_float.rs +++ b/src/test/ui/simd/libm_std_can_float.rs @@ -3,7 +3,7 @@ // This is the converse of the other libm test. #![feature(portable_simd)] use std::simd::f32x4; -use std::simd::StdFloat; +use std::simd::{SimdFloat, StdFloat}; // For SIMD float ops, the LLIR version which is used to implement the portable // forms of them may become calls to math.h AKA libm. So, we can't guarantee |
