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 21b54b0 commit 1af7483Copy full SHA for 1af7483
library/core/src/ptr/non_null.rs
@@ -1236,7 +1236,7 @@ impl<T: ?Sized> NonNull<T> {
1236
#[rustc_const_stable(feature = "const_ptr_write", since = "1.83.0")]
1237
#[cfg_attr(kani, kani::modifies(crate::ptr::slice_from_raw_parts(self.as_ptr(), count)))]
1238
#[requires(
1239
- count.checked_mul(core::mem::size_of::<T>() as usize).is_some_and(|x| x.wrapping_add(self.as_ptr() as usize) <= isize::MAX as usize) &&
+ count.checked_mul(core::mem::size_of::<T>() as usize).is_some_and(|byte_count| byte_count.wrapping_add(self.as_ptr() as usize) <= isize::MAX as usize) &&
1240
ub_checks::can_write(core::ptr::slice_from_raw_parts_mut(self.as_ptr(), count))
1241
)]
1242
#[ensures(|_|
0 commit comments