Skip to content

Commit f7412ad

Browse files
add workaround comment in Simd::splat
1 parent c963615 commit f7412ad

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/core_simd/src/vector.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ where
125125
/// assert_eq!(v.as_array(), &[8, 8, 8, 8]);
126126
/// ```
127127
pub fn splat(value: T) -> Self {
128+
// This is a workaround for `[value; LANES]` generating a loop:
129+
// https://github.com/rust-lang/rust/issues/97804
128130
struct Splat;
129131
impl<const LANES: usize> Swizzle<1, LANES> for Splat {
130132
const INDEX: [usize; LANES] = [0; LANES];

0 commit comments

Comments
 (0)