Skip to content

Commit 77545ae

Browse files
folkertdevAmanieu
authored andcommitted
let's not use &mut until we get confirmation it's OK
1 parent 6f4bed9 commit 77545ae

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

crates/core_arch/src/s390x/vector.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2903,14 +2903,14 @@ mod sealed {
29032903
self,
29042904
b: Self,
29052905
c: vector_unsigned_char,
2906-
d: &mut i32,
2906+
d: *mut i32,
29072907
) -> vector_unsigned_char;
29082908

29092909
unsafe fn vec_search_string_until_zero_cc(
29102910
self,
29112911
b: Self,
29122912
c: vector_unsigned_char,
2913-
d: &mut i32,
2913+
d: *mut i32,
29142914
) -> vector_unsigned_char;
29152915
}
29162916

@@ -2921,17 +2921,17 @@ mod sealed {
29212921
impl VectorSearchString for $ty {
29222922
#[inline]
29232923
#[target_feature(enable = "vector")]
2924-
unsafe fn vec_search_string_cc(self, b: Self, c: vector_unsigned_char, d: &mut i32) -> vector_unsigned_char {
2924+
unsafe fn vec_search_string_cc(self, b: Self, c: vector_unsigned_char, d: *mut i32) -> vector_unsigned_char {
29252925
let PackedTuple { x,y } = $intr_s(transmute(self), transmute(b), c);
2926-
*d = y;
2926+
d.write(y);
29272927
x
29282928
}
29292929

29302930
#[inline]
29312931
#[target_feature(enable = "vector")]
2932-
unsafe fn vec_search_string_until_zero_cc(self, b: Self, c: vector_unsigned_char, d: &mut i32) -> vector_unsigned_char {
2932+
unsafe fn vec_search_string_until_zero_cc(self, b: Self, c: vector_unsigned_char, d: *mut i32) -> vector_unsigned_char {
29332933
let PackedTuple { x,y } = $intr_sz(transmute(self), transmute(b), c);
2934-
*d = y;
2934+
d.write(y);
29352935
x
29362936
}
29372937
}
@@ -4584,7 +4584,7 @@ pub unsafe fn vec_search_string_cc<T: sealed::VectorSearchString>(
45844584
a: T,
45854585
b: T,
45864586
c: vector_unsigned_char,
4587-
d: &mut i32,
4587+
d: *mut i32,
45884588
) -> vector_unsigned_char {
45894589
a.vec_search_string_cc(b, c, d)
45904590
}
@@ -4597,7 +4597,7 @@ pub unsafe fn vec_search_string_until_zero_cc<T: sealed::VectorSearchString>(
45974597
a: T,
45984598
b: T,
45994599
c: vector_unsigned_char,
4600-
d: &mut i32,
4600+
d: *mut i32,
46014601
) -> vector_unsigned_char {
46024602
a.vec_search_string_until_zero_cc(b, c, d)
46034603
}

0 commit comments

Comments
 (0)