Skip to content

Commit d556b53

Browse files
author
Markus Westerlind
committed
Fix rayon compilation
1 parent 763b384 commit d556b53

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/raw/mod.rs

+15-3
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ impl<T> Bucket<T> {
358358
self.as_ptr().copy_from_nonoverlapping(other.as_ptr(), 1);
359359
}
360360

361+
#[cfg_attr(feature = "inline-more", inline)]
361362
fn cast<U>(self) -> Bucket<U> {
362363
Bucket {
363364
ptr: self.ptr.cast(),
@@ -1612,12 +1613,23 @@ impl<T> RawIterRange<T> {
16121613

16131614
let tail = Self::new(
16141615
self.inner.next_ctrl.add(mid),
1615-
self.data.next_n(Group::WIDTH).next_n(mid),
1616+
self.inner
1617+
.data
1618+
.clone()
1619+
.cast::<T>()
1620+
.next_n(Group::WIDTH)
1621+
.next_n(mid),
16161622
len - mid,
16171623
);
16181624
debug_assert_eq!(
1619-
self.data.next_n(Group::WIDTH).next_n(mid).ptr,
1620-
tail.data.ptr
1625+
self.inner
1626+
.data
1627+
.clone()
1628+
.cast::<T>()
1629+
.next_n(Group::WIDTH)
1630+
.next_n(mid)
1631+
.ptr,
1632+
tail.inner.data.clone().cast::<T>().ptr
16211633
);
16221634
debug_assert_eq!(self.inner.end, tail.inner.end);
16231635
self.inner.end = self.inner.next_ctrl.add(mid);

0 commit comments

Comments
 (0)