Skip to content

Commit c27f6f2

Browse files
committed
don't ignore sign for ABI check
1 parent 68effa1 commit c27f6f2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tests/pass/function_calls/abi_compat.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
#![feature(portable_simd)]
21
use std::mem;
32
use std::num;
4-
use std::simd;
53

64
#[derive(Copy, Clone)]
75
struct Zst;
@@ -56,19 +54,15 @@ fn test_abi_newtype<T: Copy>(t: T) {
5654

5755
fn main() {
5856
// Here we check:
59-
// - unsigned vs signed integer is allowed
60-
// - u32/i32 vs char is allowed
57+
// - u32 vs char is allowed
6158
// - u32 vs NonZeroU32/Option<NonZeroU32> is allowed
6259
// - reference vs raw pointer is allowed
6360
// - references to things of the same size and alignment are allowed
6461
// These are very basic tests that should work on all ABIs. However it is not clear that any of
6562
// these would be stably guaranteed. Code that relies on this is equivalent to code that relies
6663
// on the layout of `repr(Rust)` types. They are also fragile: the same mismatches in the fields
6764
// of a struct (even with `repr(C)`) will not always be accepted by Miri.
68-
test_abi_compat(0u32, 0i32);
69-
test_abi_compat(simd::u32x8::splat(1), simd::i32x8::splat(1));
7065
test_abi_compat(0u32, 'x');
71-
test_abi_compat(0i32, 'x');
7266
test_abi_compat(42u32, num::NonZeroU32::new(1).unwrap());
7367
test_abi_compat(0u32, Some(num::NonZeroU32::new(1).unwrap()));
7468
test_abi_compat(&0u32, &0u32 as *const u32);

0 commit comments

Comments
 (0)