@@ -477,17 +477,17 @@ impl<T: ?Sized> *mut T {
477477 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
478478 #[ requires(
479479 // If count is zero, any pointer is valid including null pointer.
480- ( count == 0 ) ||
480+ ( count == 0 ) ||
481481 // Else if count is not zero, then ensure that subtracting `count` doesn't
482482 // cause overflow and that both pointers `self` and the result are in the
483483 // same allocation
484- ( ( self . addr( ) as isize ) . checked_add( count) . is_some( ) &&
485- kani :: mem :: same_allocation( self , self . wrapping_byte_offset( count) ) )
484+ ( ( self . addr( ) as isize ) . checked_add( count) . is_some( ) &&
485+ core :: ub_checks :: same_allocation( self , self . wrapping_byte_offset( count) ) )
486486 ) ]
487487 #[ ensures( |& result|
488488 // The resulting pointer should either be unchanged or still point to the same allocation
489489 ( self . addr( ) == result. addr( ) ) ||
490- ( kani :: mem :: same_allocation( self , result) )
490+ ( core :: ub_checks :: same_allocation( self , result) )
491491 ) ]
492492 pub const unsafe fn byte_offset ( self , count : isize ) -> Self {
493493 // SAFETY: the caller must uphold the safety contract for `offset`.
@@ -1102,17 +1102,17 @@ impl<T: ?Sized> *mut T {
11021102 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
11031103 #[ requires(
11041104 // If count is zero, any pointer is valid including null pointer.
1105- ( count == 0 ) ||
1105+ ( count == 0 ) ||
11061106 // Else if count is not zero, then ensure that subtracting `count` doesn't
11071107 // cause overflow and that both pointers `self` and the result are in the
11081108 // same allocation
1109- ( ( self . addr( ) as isize ) . checked_add( count as isize ) . is_some( ) &&
1110- kani :: mem :: same_allocation( self , self . wrapping_byte_add( count) ) )
1109+ ( ( self . addr( ) as isize ) . checked_add( count as isize ) . is_some( ) &&
1110+ core :: ub_checks :: same_allocation( self , self . wrapping_byte_add( count) ) )
11111111 ) ]
11121112 #[ ensures( |& result|
11131113 // The resulting pointer should either be unchanged or still point to the same allocation
11141114 ( self . addr( ) == result. addr( ) ) ||
1115- ( kani :: mem :: same_allocation( self , result) )
1115+ ( core :: ub_checks :: same_allocation( self , result) )
11161116 ) ]
11171117 pub const unsafe fn byte_add ( self , count : usize ) -> Self {
11181118 // SAFETY: the caller must uphold the safety contract for `add`.
@@ -1248,17 +1248,17 @@ impl<T: ?Sized> *mut T {
12481248 #[ cfg_attr( miri, track_caller) ] // even without panics, this helps for Miri backtraces
12491249 #[ requires(
12501250 // If count is zero, any pointer is valid including null pointer.
1251- ( count == 0 ) ||
1251+ ( count == 0 ) ||
12521252 // Else if count is not zero, then ensure that subtracting `count` doesn't
12531253 // cause overflow and that both pointers `self` and the result are in the
12541254 // same allocation
1255- ( ( self . addr( ) as isize ) . checked_sub( count as isize ) . is_some( ) &&
1256- kani :: mem :: same_allocation( self , self . wrapping_byte_sub( count) ) )
1255+ ( ( self . addr( ) as isize ) . checked_sub( count as isize ) . is_some( ) &&
1256+ core :: ub_checks :: same_allocation( self , self . wrapping_byte_sub( count) ) )
12571257 ) ]
12581258 #[ ensures( |& result|
12591259 // The resulting pointer should either be unchanged or still point to the same allocation
12601260 ( self . addr( ) == result. addr( ) ) ||
1261- ( kani :: mem :: same_allocation( self , result) )
1261+ ( core :: ub_checks :: same_allocation( self , result) )
12621262 ) ]
12631263 pub const unsafe fn byte_sub ( self , count : usize ) -> Self {
12641264 // SAFETY: the caller must uphold the safety contract for `sub`.
0 commit comments