diff options
| author | Ralf Jung <post@ralfj.de> | 2023-08-31 17:08:47 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-08-31 17:27:23 +0200 |
| commit | cbe8a059034f87141761ebd2300c047e775fdf7b (patch) | |
| tree | 6cc754ef015f4b1e0549298a242bb1788cfb681d | |
| parent | b30b535124aabf7835a09fe1c07e469711964011 (diff) | |
| download | rust-cbe8a059034f87141761ebd2300c047e775fdf7b.tar.gz rust-cbe8a059034f87141761ebd2300c047e775fdf7b.zip | |
update abi_compat.rs
| -rw-r--r-- | src/tools/miri/tests/pass/function_calls/abi_compat.rs | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/tools/miri/tests/pass/function_calls/abi_compat.rs b/src/tools/miri/tests/pass/function_calls/abi_compat.rs index dc1e1f0ba8d..60baf8e72e8 100644 --- a/src/tools/miri/tests/pass/function_calls/abi_compat.rs +++ b/src/tools/miri/tests/pass/function_calls/abi_compat.rs @@ -1,7 +1,5 @@ -#![feature(portable_simd)] use std::mem; use std::num; -use std::simd; #[derive(Copy, Clone)] struct Zst; @@ -56,8 +54,7 @@ fn test_abi_newtype<T: Copy>(t: T) { fn main() { // Here we check: - // - unsigned vs signed integer is allowed - // - u32/i32 vs char is allowed + // - u32 vs char is allowed // - u32 vs NonZeroU32/Option<NonZeroU32> is allowed // - reference vs raw pointer is allowed // - references to things of the same size and alignment are allowed @@ -65,10 +62,7 @@ fn main() { // these would be stably guaranteed. Code that relies on this is equivalent to code that relies // on the layout of `repr(Rust)` types. They are also fragile: the same mismatches in the fields // of a struct (even with `repr(C)`) will not always be accepted by Miri. - test_abi_compat(0u32, 0i32); - test_abi_compat(simd::u32x8::splat(1), simd::i32x8::splat(1)); test_abi_compat(0u32, 'x'); - test_abi_compat(0i32, 'x'); test_abi_compat(42u32, num::NonZeroU32::new(1).unwrap()); test_abi_compat(0u32, Some(num::NonZeroU32::new(1).unwrap())); test_abi_compat(&0u32, &0u32 as *const u32); @@ -83,9 +77,6 @@ fn main() { test_abi_newtype(0u32); test_abi_newtype(0f32); test_abi_newtype((0u32, 1u32, 2u32)); - // FIXME: skipping the array tests on mips64 due to https://github.com/rust-lang/rust/issues/115404 - if !cfg!(target_arch = "mips64") { - test_abi_newtype([0u32, 1u32, 2u32]); - test_abi_newtype([0i32; 0]); - } + test_abi_newtype([0u32, 1u32, 2u32]); + test_abi_newtype([0i32; 0]); } |
