Skip to content

Commit 4a9edce

Browse files
committed
Remove assumes from the slice folds
1 parent 04269c9 commit 4a9edce

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/libcore/slice/mod.rs

-8
Original file line numberDiff line numberDiff line change
@@ -1173,10 +1173,6 @@ macro_rules! iterator {
11731173
// manual unrolling is needed when there are conditional exits from the loop
11741174
let mut accum = init;
11751175
unsafe {
1176-
if mem::size_of::<T>() != 0 {
1177-
assume(!self.ptr.is_null());
1178-
assume(self.ptr <= self.end);
1179-
}
11801176
while ptrdistance(self.ptr, self.end) >= 4 {
11811177
accum = f(accum, $mkref!(self.ptr.post_inc()))?;
11821178
accum = f(accum, $mkref!(self.ptr.post_inc()))?;
@@ -1229,10 +1225,6 @@ macro_rules! iterator {
12291225
// manual unrolling is needed when there are conditional exits from the loop
12301226
let mut accum = init;
12311227
unsafe {
1232-
if mem::size_of::<T>() != 0 {
1233-
assume(!self.ptr.is_null());
1234-
assume(self.ptr <= self.end);
1235-
}
12361228
while ptrdistance(self.ptr, self.end) >= 4 {
12371229
accum = f(accum, $mkref!(self.end.pre_dec()))?;
12381230
accum = f(accum, $mkref!(self.end.pre_dec()))?;

0 commit comments

Comments
 (0)