Skip to content

Commit dec2859

Browse files
author
Markus Westerlind
committed
Fix rayon compilation
1 parent 53ea0c2 commit dec2859

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/raw/mod.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ impl<T> Bucket<T> {
358358
self.as_ptr().copy_from_nonoverlapping(other.as_ptr(), 1);
359359
}
360360

361-
fn cast<U>(self) -> Bucket<U> {
361+
#[cfg_attr(feature = "inline-more", inline)]
362+
fn cast<U>(&self) -> Bucket<U> {
362363
Bucket {
363364
ptr: self.ptr.cast(),
364365
}
@@ -1612,12 +1613,17 @@ 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.data.cast::<T>().next_n(Group::WIDTH).next_n(mid),
16161617
len - mid,
16171618
);
16181619
debug_assert_eq!(
1619-
self.data.next_n(Group::WIDTH).next_n(mid).ptr,
1620-
tail.data.ptr
1620+
self.inner
1621+
.data
1622+
.cast::<T>()
1623+
.next_n(Group::WIDTH)
1624+
.next_n(mid)
1625+
.ptr,
1626+
tail.inner.data.cast::<T>().ptr
16211627
);
16221628
debug_assert_eq!(self.inner.end, tail.inner.end);
16231629
self.inner.end = self.inner.next_ctrl.add(mid);

0 commit comments

Comments
 (0)