Files
rust/tests/ui/simd/simd-lane-limit-ok.rs
Caleb Zulawski f5c6c9542e Add an attribute to check the number of lanes in a SIMD vector after monomorphization
Unify zero-length and oversized SIMD errors
2025-09-23 20:47:34 -04:00

15 lines
306 B
Rust

//@ build-pass
//@ aux-crate:simd=simd-lane-limit.rs
extern crate simd;
use simd::Simd;
fn main() {
let _x: Simd<i32, 4> = Simd([0; 4]);
let _y: Simd<i32, 8> = Simd([0; 8]);
// test non-power-of-two, since #[repr(simd, packed)] has unusual layout
let _z: Simd<i32, 6> = Simd([0; 6]);
}