diff --git a/crates/core_simd/src/vector.rs b/crates/core_simd/src/vector.rs index 870c2eefee1..3e39f1d623c 100644 --- a/crates/core_simd/src/vector.rs +++ b/crates/core_simd/src/vector.rs @@ -174,6 +174,7 @@ where slice.len() >= LANES, "slice length must be at least the number of lanes" ); + assert!(core::mem::size_of::() == LANES * core::mem::size_of::()); // Safety: // - We've checked the length is sufficient. // - `T` and `Simd` are Copy types. @@ -203,6 +204,7 @@ where slice.len() >= LANES, "slice length must be at least the number of lanes" ); + assert!(core::mem::size_of::() == LANES * core::mem::size_of::()); // Safety: // - We've checked the length is sufficient // - `T` and `Simd` are Copy types.