File tree 1 file changed +1
-7
lines changed
tests/pass/function_calls
1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 1
- #![ feature( portable_simd) ]
2
1
use std:: mem;
3
2
use std:: num;
4
- use std:: simd;
5
3
6
4
#[ derive( Copy , Clone ) ]
7
5
struct Zst ;
@@ -56,19 +54,15 @@ fn test_abi_newtype<T: Copy>(t: T) {
56
54
57
55
fn main ( ) {
58
56
// Here we check:
59
- // - unsigned vs signed integer is allowed
60
- // - u32/i32 vs char is allowed
57
+ // - u32 vs char is allowed
61
58
// - u32 vs NonZeroU32/Option<NonZeroU32> is allowed
62
59
// - reference vs raw pointer is allowed
63
60
// - references to things of the same size and alignment are allowed
64
61
// These are very basic tests that should work on all ABIs. However it is not clear that any of
65
62
// these would be stably guaranteed. Code that relies on this is equivalent to code that relies
66
63
// on the layout of `repr(Rust)` types. They are also fragile: the same mismatches in the fields
67
64
// 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 ) ) ;
70
65
test_abi_compat ( 0u32 , 'x' ) ;
71
- test_abi_compat ( 0i32 , 'x' ) ;
72
66
test_abi_compat ( 42u32 , num:: NonZeroU32 :: new ( 1 ) . unwrap ( ) ) ;
73
67
test_abi_compat ( 0u32 , Some ( num:: NonZeroU32 :: new ( 1 ) . unwrap ( ) ) ) ;
74
68
test_abi_compat ( & 0u32 , & 0u32 as * const u32 ) ;
You can’t perform that action at this time.
0 commit comments