From 7fb6e1aa61ddd954e1c416a5687147fb3b305adf Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Tue, 5 Oct 2021 15:46:19 -0700 Subject: [PATCH] Add regression test for issue 80108 --- src/test/ui/wasm/simd-to-array-80108.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/test/ui/wasm/simd-to-array-80108.rs diff --git a/src/test/ui/wasm/simd-to-array-80108.rs b/src/test/ui/wasm/simd-to-array-80108.rs new file mode 100644 index 00000000000..0576c2e6be1 --- /dev/null +++ b/src/test/ui/wasm/simd-to-array-80108.rs @@ -0,0 +1,15 @@ +// only-wasm32 +// compile-flags: --crate-type=lib -Copt-level=2 +// build-pass +#![feature(repr_simd)] + +// Regression test for #80108 + +#[repr(simd)] +pub struct Vector([i32; 4]); + +impl Vector { + pub const fn to_array(self) -> [i32; 4] { + self.0 + } +}