diff options
| author | bors <bors@rust-lang.org> | 2021-02-07 22:25:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-02-07 22:25:14 +0000 |
| commit | bb587b1a1737738658d2eaecd4c8c1cab555257a (patch) | |
| tree | dd6c0c0f7509d6c9d75e817485adb61ecf720c59 /src/test/ui/simd | |
| parent | 9778068cbc1e06cc3685422323ff38a2f397de26 (diff) | |
| parent | a4bab7c6fab5a44f989321c1abf4cfc72ebb1d28 (diff) | |
| download | rust-bb587b1a1737738658d2eaecd4c8c1cab555257a.tar.gz rust-bb587b1a1737738658d2eaecd4c8c1cab555257a.zip | |
Auto merge of #80652 - calebzulawski:simd-lanes, r=nagisa
Improve SIMD type element count validation Resolves rust-lang/stdsimd#53. These changes are motivated by `stdsimd` moving in the direction of const generic vectors, e.g.: ```rust #[repr(simd)] struct SimdF32<const N: usize>([f32; N]); ``` This makes a few changes: * Establishes a maximum SIMD lane count of 2^16 (65536). This value is arbitrary, but attempts to validate lane count before hitting potential errors in the backend. It's not clear what LLVM's maximum lane count is, but cranelift's appears to be much less than `usize::MAX`, at least. * Expands some SIMD intrinsics to support arbitrary lane counts. This resolves the ICE in the linked issue. * Attempts to catch invalid-sized vectors during typeck when possible. Unresolved questions: * Generic-length vectors can't be validated in typeck and are only validated after monomorphization while computing layout. This "works", but the errors simply bail out with no context beyond the name of the type. Should these errors instead return `LayoutError` or otherwise provide context in some way? As it stands, users of `stdsimd` could trivially produce monomorphization errors by making zero-length vectors. cc `@bjorn3`
Diffstat (limited to 'src/test/ui/simd')
| -rw-r--r-- | src/test/ui/simd/issue-17170.rs | 11 | ||||
| -rw-r--r-- | src/test/ui/simd/issue-17170.stderr | 11 | ||||
| -rw-r--r-- | src/test/ui/simd/issue-39720.rs | 23 | ||||
| -rw-r--r-- | src/test/ui/simd/issue-39720.stderr | 15 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-intrinsic-generic-elements.rs | 24 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-size-align.rs | 103 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-type-generic-monomorphisation-empty.rs | 12 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-type-generic-monomorphisation-empty.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-type-generic-monomorphisation-oversized.rs | 12 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-type-generic-monomorphisation-oversized.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-type-generic-monomorphisation-power-of-two.rs | 12 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-type-generic-monomorphisation-power-of-two.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-type-generic-monomorphisation.rs | 15 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-type-generic-monomorphisation.stderr | 4 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-type.rs | 34 | ||||
| -rw-r--r-- | src/test/ui/simd/simd-type.stderr | 46 |
16 files changed, 232 insertions, 102 deletions
diff --git a/src/test/ui/simd/issue-17170.rs b/src/test/ui/simd/issue-17170.rs new file mode 100644 index 00000000000..49cfbab9a3e --- /dev/null +++ b/src/test/ui/simd/issue-17170.rs @@ -0,0 +1,11 @@ +#![feature(repr_simd)] + +#[repr(simd)] +struct T(f64, f64, f64); +//~^ ERROR SIMD vector length must be a power of two + +static X: T = T(0.0, 0.0, 0.0); + +fn main() { + let _ = X; +} diff --git a/src/test/ui/simd/issue-17170.stderr b/src/test/ui/simd/issue-17170.stderr new file mode 100644 index 00000000000..b35c3c4dc98 --- /dev/null +++ b/src/test/ui/simd/issue-17170.stderr @@ -0,0 +1,11 @@ +error[E0075]: SIMD vector length must be a power of two + --> $DIR/issue-17170.rs:4:1 + | +LL | struct T(f64, f64, f64); + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: monomorphising SIMD type `T` of non-power-of-two length + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0075`. diff --git a/src/test/ui/simd/issue-39720.rs b/src/test/ui/simd/issue-39720.rs new file mode 100644 index 00000000000..7d596926512 --- /dev/null +++ b/src/test/ui/simd/issue-39720.rs @@ -0,0 +1,23 @@ +// ignore-emscripten FIXME(#45351) + +#![feature(repr_simd, platform_intrinsics)] + +#[repr(simd)] +#[derive(Copy, Clone, Debug)] +pub struct Char3(pub i8, pub i8, pub i8); +//~^ ERROR SIMD vector length must be a power of two + +#[repr(simd)] +#[derive(Copy, Clone, Debug)] +pub struct Short3(pub i16, pub i16, pub i16); +//~^ ERROR SIMD vector length must be a power of two + +extern "platform-intrinsic" { + fn simd_cast<T, U>(x: T) -> U; +} + +fn main() { + let cast: Short3 = unsafe { simd_cast(Char3(10, -3, -9)) }; + + println!("{:?}", cast); +} diff --git a/src/test/ui/simd/issue-39720.stderr b/src/test/ui/simd/issue-39720.stderr new file mode 100644 index 00000000000..355ceff0050 --- /dev/null +++ b/src/test/ui/simd/issue-39720.stderr @@ -0,0 +1,15 @@ +error[E0075]: SIMD vector length must be a power of two + --> $DIR/issue-39720.rs:7:1 + | +LL | pub struct Char3(pub i8, pub i8, pub i8); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0075]: SIMD vector length must be a power of two + --> $DIR/issue-39720.rs:12:1 + | +LL | pub struct Short3(pub i16, pub i16, pub i16); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0075`. diff --git a/src/test/ui/simd/simd-intrinsic-generic-elements.rs b/src/test/ui/simd/simd-intrinsic-generic-elements.rs index ea3d4b18944..a85ec7c5823 100644 --- a/src/test/ui/simd/simd-intrinsic-generic-elements.rs +++ b/src/test/ui/simd/simd-intrinsic-generic-elements.rs @@ -10,10 +10,6 @@ struct i32x2(i32, i32); #[repr(simd)] #[derive(Copy, Clone, Debug, PartialEq)] #[allow(non_camel_case_types)] -struct i32x3(i32, i32, i32); -#[repr(simd)] -#[derive(Copy, Clone, Debug, PartialEq)] -#[allow(non_camel_case_types)] struct i32x4(i32, i32, i32, i32); #[repr(simd)] #[derive(Copy, Clone, Debug, PartialEq)] @@ -26,7 +22,6 @@ extern "platform-intrinsic" { fn simd_extract<T, E>(x: T, idx: u32) -> E; fn simd_shuffle2<T, U>(x: T, y: T, idx: [u32; 2]) -> U; - fn simd_shuffle3<T, U>(x: T, y: T, idx: [u32; 3]) -> U; fn simd_shuffle4<T, U>(x: T, y: T, idx: [u32; 4]) -> U; fn simd_shuffle8<T, U>(x: T, y: T, idx: [u32; 8]) -> U; } @@ -45,17 +40,12 @@ macro_rules! all_eq { fn main() { let x2 = i32x2(20, 21); - let x3 = i32x3(30, 31, 32); let x4 = i32x4(40, 41, 42, 43); let x8 = i32x8(80, 81, 82, 83, 84, 85, 86, 87); unsafe { all_eq!(simd_insert(x2, 0, 100), i32x2(100, 21)); all_eq!(simd_insert(x2, 1, 100), i32x2(20, 100)); - all_eq!(simd_insert(x3, 0, 100), i32x3(100, 31, 32)); - all_eq!(simd_insert(x3, 1, 100), i32x3(30, 100, 32)); - all_eq!(simd_insert(x3, 2, 100), i32x3(30, 31, 100)); - all_eq!(simd_insert(x4, 0, 100), i32x4(100, 41, 42, 43)); all_eq!(simd_insert(x4, 1, 100), i32x4(40, 100, 42, 43)); all_eq!(simd_insert(x4, 2, 100), i32x4(40, 41, 100, 43)); @@ -73,10 +63,6 @@ fn main() { all_eq!(simd_extract(x2, 0), 20); all_eq!(simd_extract(x2, 1), 21); - all_eq!(simd_extract(x3, 0), 30); - all_eq!(simd_extract(x3, 1), 31); - all_eq!(simd_extract(x3, 2), 32); - all_eq!(simd_extract(x4, 0), 40); all_eq!(simd_extract(x4, 1), 41); all_eq!(simd_extract(x4, 2), 42); @@ -93,30 +79,20 @@ fn main() { } let y2 = i32x2(120, 121); - let y3 = i32x3(130, 131, 132); let y4 = i32x4(140, 141, 142, 143); let y8 = i32x8(180, 181, 182, 183, 184, 185, 186, 187); unsafe { all_eq!(simd_shuffle2(x2, y2, [3, 0]), i32x2(121, 20)); - all_eq!(simd_shuffle3(x2, y2, [3, 0, 1]), i32x3(121, 20, 21)); all_eq!(simd_shuffle4(x2, y2, [3, 0, 1, 2]), i32x4(121, 20, 21, 120)); all_eq!(simd_shuffle8(x2, y2, [3, 0, 1, 2, 1, 2, 3, 0]), i32x8(121, 20, 21, 120, 21, 120, 121, 20)); - all_eq!(simd_shuffle2(x3, y3, [4, 2]), i32x2(131, 32)); - all_eq!(simd_shuffle3(x3, y3, [4, 2, 3]), i32x3(131, 32, 130)); - all_eq!(simd_shuffle4(x3, y3, [4, 2, 3, 0]), i32x4(131, 32, 130, 30)); - all_eq!(simd_shuffle8(x3, y3, [4, 2, 3, 0, 1, 5, 5, 1]), - i32x8(131, 32, 130, 30, 31, 132, 132, 31)); - all_eq!(simd_shuffle2(x4, y4, [7, 2]), i32x2(143, 42)); - all_eq!(simd_shuffle3(x4, y4, [7, 2, 5]), i32x3(143, 42, 141)); all_eq!(simd_shuffle4(x4, y4, [7, 2, 5, 0]), i32x4(143, 42, 141, 40)); all_eq!(simd_shuffle8(x4, y4, [7, 2, 5, 0, 3, 6, 4, 1]), i32x8(143, 42, 141, 40, 43, 142, 140, 41)); all_eq!(simd_shuffle2(x8, y8, [11, 5]), i32x2(183, 85)); - all_eq!(simd_shuffle3(x8, y8, [11, 5, 15]), i32x3(183, 85, 187)); all_eq!(simd_shuffle4(x8, y8, [11, 5, 15, 0]), i32x4(183, 85, 187, 80)); all_eq!(simd_shuffle8(x8, y8, [11, 5, 15, 0, 3, 8, 12, 1]), i32x8(183, 85, 187, 80, 83, 180, 184, 81)); diff --git a/src/test/ui/simd/simd-size-align.rs b/src/test/ui/simd/simd-size-align.rs index 556013788c3..0afa4947225 100644 --- a/src/test/ui/simd/simd-size-align.rs +++ b/src/test/ui/simd/simd-size-align.rs @@ -10,87 +10,44 @@ use std::mem; /// `T` should satisfy `size_of T (mod min_align_of T) === 0` to be stored at `Vec<T>` properly /// Please consult the issue #20460 fn check<T>() { - assert_eq!(mem::size_of::<T>() % mem::min_align_of::<T>(), 0) + assert_eq!(mem::size_of::<T>() % mem::min_align_of::<T>(), 0); + assert_eq!(mem::size_of::<T>() % mem::min_align_of::<T>(), 0); + assert_eq!(mem::size_of::<T>() % mem::min_align_of::<T>(), 0); } -fn main() { - check::<u8x2>(); - check::<u8x3>(); - check::<u8x4>(); - check::<u8x5>(); - check::<u8x6>(); - check::<u8x7>(); - check::<u8x8>(); +#[repr(simd)] +struct U8<const N: usize>([u8; N]); - check::<i16x2>(); - check::<i16x3>(); - check::<i16x4>(); - check::<i16x5>(); - check::<i16x6>(); - check::<i16x7>(); - check::<i16x8>(); +#[repr(simd)] +struct I16<const N: usize>([i16; N]); - check::<f32x2>(); - check::<f32x3>(); - check::<f32x4>(); - check::<f32x5>(); - check::<f32x6>(); - check::<f32x7>(); - check::<f32x8>(); +#[repr(simd)] +struct F32<const N: usize>([f32; N]); - check::<usizex2>(); - check::<usizex3>(); - check::<usizex4>(); - check::<usizex5>(); - check::<usizex6>(); - check::<usizex7>(); - check::<usizex8>(); +#[repr(simd)] +struct Usize<const N: usize>([usize; N]); - check::<isizex2>(); - check::<isizex3>(); - check::<isizex4>(); - check::<isizex5>(); - check::<isizex6>(); - check::<isizex7>(); - check::<isizex8>(); -} +#[repr(simd)] +struct Isize<const N: usize>([isize; N]); -#[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); +fn main() { + check::<U8<2>>(); + check::<U8<4>>(); + check::<U8<8>>(); -#[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); + check::<I16<2>>(); + check::<I16<4>>(); + check::<I16<8>>(); -#[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); + check::<F32<2>>(); + check::<F32<4>>(); + check::<F32<8>>(); -#[repr(simd)] struct usizex2(usize, usize); -#[repr(simd)] struct usizex3(usize, usize, usize); -#[repr(simd)] struct usizex4(usize, usize, usize, usize); -#[repr(simd)] struct usizex5(usize, usize, usize, usize, usize); -#[repr(simd)] struct usizex6(usize, usize, usize, usize, usize, usize); -#[repr(simd)] struct usizex7(usize, usize, usize, usize, usize, usize, usize); -#[repr(simd)] struct usizex8(usize, usize, usize, usize, usize, usize, usize, usize); + check::<Usize<2>>(); + check::<Usize<4>>(); + check::<Usize<8>>(); -#[repr(simd)] struct isizex2(isize, isize); -#[repr(simd)] struct isizex3(isize, isize, isize); -#[repr(simd)] struct isizex4(isize, isize, isize, isize); -#[repr(simd)] struct isizex5(isize, isize, isize, isize, isize); -#[repr(simd)] struct isizex6(isize, isize, isize, isize, isize, isize); -#[repr(simd)] struct isizex7(isize, isize, isize, isize, isize, isize, isize); -#[repr(simd)] struct isizex8(isize, isize, isize, isize, isize, isize, isize, isize); + check::<Isize<2>>(); + check::<Isize<4>>(); + check::<Isize<8>>(); +} diff --git a/src/test/ui/simd/simd-type-generic-monomorphisation-empty.rs b/src/test/ui/simd/simd-type-generic-monomorphisation-empty.rs new file mode 100644 index 00000000000..0121404c749 --- /dev/null +++ b/src/test/ui/simd/simd-type-generic-monomorphisation-empty.rs @@ -0,0 +1,12 @@ +// build-fail + +#![feature(repr_simd, platform_intrinsics)] + +// error-pattern:monomorphising SIMD type `Simd<0_usize>` of zero length + +#[repr(simd)] +struct Simd<const N: usize>([f32; N]); + +fn main() { + let _ = Simd::<0>([]); +} diff --git a/src/test/ui/simd/simd-type-generic-monomorphisation-empty.stderr b/src/test/ui/simd/simd-type-generic-monomorphisation-empty.stderr new file mode 100644 index 00000000000..00fde199b12 --- /dev/null +++ b/src/test/ui/simd/simd-type-generic-monomorphisation-empty.stderr @@ -0,0 +1,4 @@ +error: monomorphising SIMD type `Simd<0_usize>` of zero length + +error: aborting due to previous error + diff --git a/src/test/ui/simd/simd-type-generic-monomorphisation-oversized.rs b/src/test/ui/simd/simd-type-generic-monomorphisation-oversized.rs new file mode 100644 index 00000000000..bd0d457b35e --- /dev/null +++ b/src/test/ui/simd/simd-type-generic-monomorphisation-oversized.rs @@ -0,0 +1,12 @@ +// build-fail + +#![feature(repr_simd, platform_intrinsics)] + +// error-pattern:monomorphising SIMD type `Simd<65536_usize>` of length greater than 32768 + +#[repr(simd)] +struct Simd<const N: usize>([f32; N]); + +fn main() { + let _ = Simd::<65536>([0.; 65536]); +} diff --git a/src/test/ui/simd/simd-type-generic-monomorphisation-oversized.stderr b/src/test/ui/simd/simd-type-generic-monomorphisation-oversized.stderr new file mode 100644 index 00000000000..f4418350115 --- /dev/null +++ b/src/test/ui/simd/simd-type-generic-monomorphisation-oversized.stderr @@ -0,0 +1,4 @@ +error: monomorphising SIMD type `Simd<65536_usize>` of length greater than 32768 + +error: aborting due to previous error + diff --git a/src/test/ui/simd/simd-type-generic-monomorphisation-power-of-two.rs b/src/test/ui/simd/simd-type-generic-monomorphisation-power-of-two.rs new file mode 100644 index 00000000000..3a0b9e02663 --- /dev/null +++ b/src/test/ui/simd/simd-type-generic-monomorphisation-power-of-two.rs @@ -0,0 +1,12 @@ +// build-fail + +#![feature(repr_simd, platform_intrinsics)] + +// error-pattern:monomorphising SIMD type `Simd<3_usize>` of non-power-of-two length + +#[repr(simd)] +struct Simd<const N: usize>([f32; N]); + +fn main() { + let _ = Simd::<3>([0.; 3]); +} diff --git a/src/test/ui/simd/simd-type-generic-monomorphisation-power-of-two.stderr b/src/test/ui/simd/simd-type-generic-monomorphisation-power-of-two.stderr new file mode 100644 index 00000000000..82cc0d8714a --- /dev/null +++ b/src/test/ui/simd/simd-type-generic-monomorphisation-power-of-two.stderr @@ -0,0 +1,4 @@ +error: monomorphising SIMD type `Simd<3_usize>` of non-power-of-two length + +error: aborting due to previous error + diff --git a/src/test/ui/simd/simd-type-generic-monomorphisation.rs b/src/test/ui/simd/simd-type-generic-monomorphisation.rs new file mode 100644 index 00000000000..0275f0ce4c1 --- /dev/null +++ b/src/test/ui/simd/simd-type-generic-monomorphisation.rs @@ -0,0 +1,15 @@ +// build-fail + +#![feature(repr_simd, platform_intrinsics)] + +// ignore-tidy-linelength + +// error-pattern:monomorphising SIMD type `Simd2<X>` with a non-primitive-scalar (integer/float/pointer) element type `X` + +struct X(Vec<i32>); +#[repr(simd)] +struct Simd2<T>(T, T); + +fn main() { + let _ = Simd2(X(vec![]), X(vec![])); +} diff --git a/src/test/ui/simd/simd-type-generic-monomorphisation.stderr b/src/test/ui/simd/simd-type-generic-monomorphisation.stderr new file mode 100644 index 00000000000..7f23893ac85 --- /dev/null +++ b/src/test/ui/simd/simd-type-generic-monomorphisation.stderr @@ -0,0 +1,4 @@ +error: monomorphising SIMD type `Simd2<X>` with a non-primitive-scalar (integer/float/pointer) element type `X` + +error: aborting due to previous error + diff --git a/src/test/ui/simd/simd-type.rs b/src/test/ui/simd/simd-type.rs index e7b9bfe32f8..cc7443d0485 100644 --- a/src/test/ui/simd/simd-type.rs +++ b/src/test/ui/simd/simd-type.rs @@ -1,9 +1,33 @@ -// run-pass -#![allow(dead_code)] +#![feature(repr_simd)] +#![allow(non_camel_case_types)] -// pretty-expanded FIXME #23616 +// ignore-tidy-linelength -#![feature(repr_simd)] +#[repr(simd)] +struct empty; //~ ERROR SIMD vector cannot be empty + +#[repr(simd)] +struct empty2([f32; 0]); //~ ERROR SIMD vector cannot be empty + +#[repr(simd)] +struct pow2([f32; 7]); //~ ERROR SIMD vector length must be a power of two + +#[repr(simd)] +struct i64f64(i64, f64); //~ ERROR SIMD vector should be homogeneous + +struct Foo; + +#[repr(simd)] +struct FooV(Foo, Foo); //~ ERROR SIMD vector element type should be a primitive scalar (integer/float/pointer) type + +#[repr(simd)] +struct FooV2([Foo; 2]); //~ ERROR SIMD vector element type should be a primitive scalar (integer/float/pointer) type + +#[repr(simd)] +struct TooBig([f32; 65536]); //~ ERROR SIMD vector cannot have more than 32768 elements + +#[repr(simd)] +struct JustRight([u128; 32768]); #[repr(simd)] struct RGBA { @@ -13,4 +37,4 @@ struct RGBA { a: f32 } -pub fn main() {} +fn main() {} diff --git a/src/test/ui/simd/simd-type.stderr b/src/test/ui/simd/simd-type.stderr new file mode 100644 index 00000000000..8b15ef05e03 --- /dev/null +++ b/src/test/ui/simd/simd-type.stderr @@ -0,0 +1,46 @@ +error[E0075]: SIMD vector cannot be empty + --> $DIR/simd-type.rs:7:1 + | +LL | struct empty; + | ^^^^^^^^^^^^^ + +error[E0075]: SIMD vector cannot be empty + --> $DIR/simd-type.rs:10:1 + | +LL | struct empty2([f32; 0]); + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0075]: SIMD vector length must be a power of two + --> $DIR/simd-type.rs:13:1 + | +LL | struct pow2([f32; 7]); + | ^^^^^^^^^^^^^^^^^^^^^^ + +error[E0076]: SIMD vector should be homogeneous + --> $DIR/simd-type.rs:16:1 + | +LL | struct i64f64(i64, f64); + | ^^^^^^^^^^^^^^^^^^^^^^^^ SIMD elements must have the same type + +error[E0077]: SIMD vector element type should be a primitive scalar (integer/float/pointer) type + --> $DIR/simd-type.rs:21:1 + | +LL | struct FooV(Foo, Foo); + | ^^^^^^^^^^^^^^^^^^^^^^ + +error[E0077]: SIMD vector element type should be a primitive scalar (integer/float/pointer) type + --> $DIR/simd-type.rs:24:1 + | +LL | struct FooV2([Foo; 2]); + | ^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0075]: SIMD vector cannot have more than 32768 elements + --> $DIR/simd-type.rs:27:1 + | +LL | struct TooBig([f32; 65536]); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 7 previous errors + +Some errors have detailed explanations: E0075, E0076, E0077. +For more information about an error, try `rustc --explain E0075`. |
