We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b8cb18 commit 5994771Copy full SHA for 5994771
crates/core_simd/src/macros.rs
@@ -52,7 +52,23 @@ macro_rules! impl_vector {
52
53
/// Converts a SIMD vector to an array.
54
pub const fn to_array(self) -> [$type; LANES] {
55
- self.0
+ // workaround for rust-lang/rust#80108
56
+ // TODO fix this
57
+ #[cfg(target_arch = "wasm32")]
58
+ {
59
+ let mut arr = [self.0[0]; LANES];
60
+ let mut i = 0;
61
+ while i < LANES {
62
+ arr[i] = self.0[i];
63
+ i += 1;
64
+ }
65
+ arr
66
67
+
68
+ #[cfg(not(target_arch = "wasm32"))]
69
70
+ self.0
71
72
}
73
74
0 commit comments