// run-pass #![allow(deprecated)] #![feature(repr_simd)] #![allow(non_camel_case_types)] use std::mem; /// `T` should satisfy `size_of T (mod min_align_of T) === 0` to be stored at `Vec` properly /// Please consult the issue #20460 fn check() { assert_eq!(mem::size_of::() % mem::min_align_of::(), 0); assert_eq!(mem::size_of::() % mem::min_align_of::(), 0); assert_eq!(mem::size_of::() % mem::min_align_of::(), 0); } #[repr(simd)] struct U8([u8; N]); #[repr(simd)] struct I16([i16; N]); #[repr(simd)] struct F32([f32; N]); #[repr(simd)] struct Usize([usize; N]); #[repr(simd)] struct Isize([isize; N]); fn main() { check::>(); check::>(); check::>(); check::>(); check::>(); check::>(); check::>(); check::>(); check::>(); check::>(); check::>(); check::>(); check::>(); check::>(); check::>(); }