Closed
Description
(Splitting from https://github.com/rust-lang/rust/pull/59238/files/8477a04a72a6f8e0adb46be91a2628b07648c200#r266976217)
Consider the following (playground):
use std::arch::x86_64::__m128;
#[allow(improper_ctypes)]
extern "C" {
fn e(x: __m128);
}
which produces the following error (correctly):
error: use of SIMD type `__m128` in FFI is highly experimental and may result in invalid code
--> src/lib.rs:5:13
|
5 | fn e(x: __m128);
| ^^^^^^
|
= help: add `#![feature(simd_ffi)]` to the crate attributes to enable
But when we use it on struct (playground):
#[repr(transparent)] pub struct A(__m128);
#[repr(C)] pub struct B(__m128);
it just compiles fine on stable Rust, while we should gate it. We should eventually disallow it through a future incompat lint.