We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d617ed4 commit 79ac2dcCopy full SHA for 79ac2dc
src/test/ui/rfcs/rfc-2574-simd-ffi/simd-ffi-incorrect-type-use.rs
@@ -0,0 +1,20 @@
1
+// only-x86_64
2
+// check-pass <- FIXME, see the below comment.
3
+
4
+// The current stable rustc accepts this but it should fail.
5
6
+#![allow(improper_ctypes, improper_ctypes_definitions)]
7
8
+use std::arch::x86_64::__m128;
9
10
+extern "C" {
11
+ pub fn a(x: A);
12
+ pub fn b(x: B);
13
+}
14
15
+#[repr(transparent)] pub struct A(__m128);
16
+#[repr(C)] pub struct B(__m128);
17
18
+pub extern "C" fn foo(x: __m128) -> __m128 { x }
19
20
+fn main() {}
0 commit comments