1 // ignore-emscripten FIXME(#45351)
3 #![feature(repr_simd, platform_intrinsics)]
6 #[derive(Copy, Clone, Debug)]
7 pub struct Char3(pub i8, pub i8, pub i8);
8 //~^ ERROR SIMD vector length must be a power of two
11 #[derive(Copy, Clone, Debug)]
12 pub struct Short3(pub i16, pub i16, pub i16);
13 //~^ ERROR SIMD vector length must be a power of two
15 extern "platform-intrinsic" {
16 fn simd_cast<T, U>(x: T) -> U;
20 let cast: Short3 = unsafe { simd_cast(Char3(10, -3, -9)) };
22 println!("{:?}", cast);