about summary refs log tree commit diff
path: root/tests/ui/wasm/simd-to-array-80108.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/wasm/simd-to-array-80108.rs')
-rw-r--r--tests/ui/wasm/simd-to-array-80108.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/ui/wasm/simd-to-array-80108.rs b/tests/ui/wasm/simd-to-array-80108.rs
index c7f8585eaa4..f6b368992be 100644
--- a/tests/ui/wasm/simd-to-array-80108.rs
+++ b/tests/ui/wasm/simd-to-array-80108.rs
@@ -10,6 +10,8 @@ pub struct Vector([i32; 4]);
 
 impl Vector {
     pub const fn to_array(self) -> [i32; 4] {
-        self.0
+        // This used to just be `.0`, but that was banned in
+        // <https://github.com/rust-lang/compiler-team/issues/838>
+        unsafe { std::mem::transmute(self) }
     }
 }