Files
rust/tests/ui/simd/monomorphize-zero-length.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

11 lines
199 B
Rust

//@ build-fail
#![feature(repr_simd)]
#[repr(simd)]
struct Simd<T, const N: usize>([T; N]);
fn main() {
let _empty = Simd([1.0; 0]); //~ ERROR the SIMD type `Simd<f64, 0>` has zero elements
}