os-rust/tests/ui/simd/monomorphize-zero-length.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
216 B
Rust
Raw Normal View History

2024-08-22 01:28:20 -07:00
//@ build-fail
//@ error-pattern: monomorphising SIMD type `Simd<f64, 0>` of zero length
#![feature(repr_simd)]
#[repr(simd)]
struct Simd<T, const N: usize>([T; N]);
fn main() {
let _empty = Simd([1.0; 0]);
}