summaryrefslogtreecommitdiffstats
path: root/src/test/ui/wasm/simd-to-array-80108.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/wasm/simd-to-array-80108.rs')
-rw-r--r--src/test/ui/wasm/simd-to-array-80108.rs15
1 files changed, 15 insertions, 0 deletions
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 000000000..0576c2e6b
--- /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
+ }
+}