diff options
| author | Caleb Zulawski <caleb.zulawski@gmail.com> | 2025-09-16 02:23:24 -0400 |
|---|---|---|
| committer | Caleb Zulawski <caleb.zulawski@gmail.com> | 2025-09-23 20:47:34 -0400 |
| commit | f5c6c9542ecfab74e654f9b7f1150d486560ae43 (patch) | |
| tree | 2453dd1ffbee52a2687dbde5fcdc535dd37613f8 /tests/ui/simd/simd-lane-limit-err.rs | |
| parent | 9d82de19dfae60e55c291f5f28e28cfc2c1b9630 (diff) | |
| download | rust-f5c6c9542ecfab74e654f9b7f1150d486560ae43.tar.gz rust-f5c6c9542ecfab74e654f9b7f1150d486560ae43.zip | |
Add an attribute to check the number of lanes in a SIMD vector after monomorphization
Unify zero-length and oversized SIMD errors
Diffstat (limited to 'tests/ui/simd/simd-lane-limit-err.rs')
| -rw-r--r-- | tests/ui/simd/simd-lane-limit-err.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/simd/simd-lane-limit-err.rs b/tests/ui/simd/simd-lane-limit-err.rs new file mode 100644 index 00000000000..00390bdbdaf --- /dev/null +++ b/tests/ui/simd/simd-lane-limit-err.rs @@ -0,0 +1,11 @@ +//@ build-fail +//@ aux-crate:simd=simd-lane-limit.rs + +extern crate simd; + +use simd::Simd; + +fn main() { + let _x: Simd<i32, 16> = Simd([0; 16]); + //~^ ERROR the SIMD type `simd::Simd<i32, 16>` has more elements than the limit 8 +} |
