We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b28a368 commit 67758dbCopy full SHA for 67758db
library/alloc/src/slice.rs
@@ -535,7 +535,7 @@ impl<T> [T] {
535
#[cfg(kani)]
536
let len_ptr = unsafe { (&buf as *const Vec<T> as *const usize).add(2) };
537
#[cfg_attr(kani, kani::loop_invariant(
538
- kani::mem::same_allocation(buf.as_ptr(), buf.as_ptr().wrapping_add(capacity)) &&
+ kani::mem::same_allocation(buf.as_ptr() as *const T, (buf.as_ptr() as *const T).wrapping_add(capacity)) &&
539
unsafe {*len_ptr <= T::MAX_SLICE_LEN} &&
540
unsafe {*len_ptr <= capacity} &&
541
m.leading_zeros() > n.leading_zeros() &&
0 commit comments