Skip to content

Commit 67758db

Browse files
add ptr type
1 parent b28a368 commit 67758db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/alloc/src/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ impl<T> [T] {
535535
#[cfg(kani)]
536536
let len_ptr = unsafe { (&buf as *const Vec<T> as *const usize).add(2) };
537537
#[cfg_attr(kani, kani::loop_invariant(
538-
kani::mem::same_allocation(buf.as_ptr(), buf.as_ptr().wrapping_add(capacity)) &&
538+
kani::mem::same_allocation(buf.as_ptr() as *const T, (buf.as_ptr() as *const T).wrapping_add(capacity)) &&
539539
unsafe {*len_ptr <= T::MAX_SLICE_LEN} &&
540540
unsafe {*len_ptr <= capacity} &&
541541
m.leading_zeros() > n.leading_zeros() &&

0 commit comments

Comments
 (0)