// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![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) } fn main() { check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); check::(); } #[repr(simd)] struct u8x2(u8, u8); #[repr(simd)] struct u8x3(u8, u8, u8); #[repr(simd)] struct u8x4(u8, u8, u8, u8); #[repr(simd)] struct u8x5(u8, u8, u8, u8, u8); #[repr(simd)] struct u8x6(u8, u8, u8, u8, u8, u8); #[repr(simd)] struct u8x7(u8, u8, u8, u8, u8, u8, u8); #[repr(simd)] struct u8x8(u8, u8, u8, u8, u8, u8, u8, u8); #[repr(simd)] struct i16x2(i16, i16); #[repr(simd)] struct i16x3(i16, i16, i16); #[repr(simd)] struct i16x4(i16, i16, i16, i16); #[repr(simd)] struct i16x5(i16, i16, i16, i16, i16); #[repr(simd)] struct i16x6(i16, i16, i16, i16, i16, i16); #[repr(simd)] struct i16x7(i16, i16, i16, i16, i16, i16, i16); #[repr(simd)] struct i16x8(i16, i16, i16, i16, i16, i16, i16, i16); #[repr(simd)] struct f32x2(f32, f32); #[repr(simd)] struct f32x3(f32, f32, f32); #[repr(simd)] struct f32x4(f32, f32, f32, f32); #[repr(simd)] struct f32x5(f32, f32, f32, f32, f32); #[repr(simd)] struct f32x6(f32, f32, f32, f32, f32, f32); #[repr(simd)] struct f32x7(f32, f32, f32, f32, f32, f32, f32); #[repr(simd)] struct f32x8(f32, f32, f32, f32, f32, f32, f32, f32);