Skip to content

Commit 13423ce

Browse files
authored
Constrain Output type for indexing ops (#131)
An oversight from #112: we can't currently use indexing ops in the native-width associated types (`f32s`, etc.) because we never specified their output type. This PR fixes that.
1 parent 2c1ae23 commit 13423ce

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fearless_simd/src/generated/simd_trait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,8 @@ pub trait SimdBase<Element: SimdElement, S: Simd>:
927927
+ 'static
928928
+ crate::Bytes
929929
+ SimdFrom<Element, S>
930-
+ core::ops::Index<usize>
931-
+ core::ops::IndexMut<usize>
930+
+ core::ops::Index<usize, Output = Element>
931+
+ core::ops::IndexMut<usize, Output = Element>
932932
{
933933
const N: usize;
934934
#[doc = r" A SIMD vector mask with the same number of elements."]

fearless_simd_gen/src/mk_simd_trait.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ fn mk_simd_base() -> TokenStream {
6464
pub trait SimdBase<Element: SimdElement, S: Simd>:
6565
Copy + Sync + Send + 'static
6666
+ crate::Bytes + SimdFrom<Element, S>
67-
+ core::ops::Index<usize> + core::ops::IndexMut<usize>
67+
+ core::ops::Index<usize, Output = Element> + core::ops::IndexMut<usize, Output = Element>
6868
{
6969
const N: usize;
7070
/// A SIMD vector mask with the same number of elements.

0 commit comments

Comments
 (0)