@@ -333,7 +333,10 @@ impl<T: ?Sized> NonNull<T> {
333333 #[ must_use]
334334 #[ inline]
335335 #[ stable( feature = "strict_provenance" , since = "1.84.0" ) ]
336+ <<<<<<< HEAD
336337 #[ ensures ( |result| result. get( ) == self . as_ptr( ) as * const ( ) as usize) ]
338+ =======
339+ >>>>>>> 16 d4ed08dbd3f6db3007def332f925f9ca7e6b78
337340 pub fn addr ( self ) -> NonZero < usize > {
338341 // SAFETY: The pointer is guaranteed by the type to be non-null,
339342 // meaning that the address will be non-zero.
@@ -362,7 +365,10 @@ impl<T: ?Sized> NonNull<T> {
362365 #[ must_use]
363366 #[ inline]
364367 #[ stable( feature = "strict_provenance" , since = "1.84.0" ) ]
368+ <<<<<<< HEAD
365369 #[ ensures ( |result: & Self | !result. as_ptr( ) . is_null( ) && result. addr( ) == addr) ]
370+ =======
371+ >>>>>>> 16 d4ed08dbd3f6db3007def332f925f9ca7e6b78
366372 pub fn with_addr ( self , addr : NonZero < usize > ) -> Self {
367373 // SAFETY: The result of `ptr::from::with_addr` is non-null because `addr` is guaranteed to be non-zero.
368374 unsafe { NonNull :: new_unchecked ( self . as_ptr ( ) . with_addr( addr. get( ) ) as * mut _ ) }
@@ -377,7 +383,10 @@ impl<T: ?Sized> NonNull<T> {
377383 #[ must_use]
378384 #[ inline]
379385 #[ stable( feature = "strict_provenance" , since = "1.84.0" ) ]
386+ <<<<<<< HEAD
380387 #[ ensures ( |result: & Self | !result. as_ptr( ) . is_null( ) ) ]
388+ =======
389+ >>>>>>> 16 d4ed08dbd3f6db3007def332f925f9ca7e6b78
381390 pub fn map_addr ( self , f : impl FnOnce ( NonZero < usize > ) -> NonZero < usize > ) -> Self {
382391 self . with_addr( f( self . addr( ) ) )
383392 }
@@ -737,12 +746,15 @@ impl<T: ?Sized> NonNull<T> {
737746 #[ must_use = "returns a new pointer rather than modifying its argument" ]
738747 #[ stable( feature = "non_null_convenience" , since = "1.80.0" ) ]
739748 #[ rustc_const_stable( feature = "non_null_convenience" , since = "1.80.0" ) ]
749+ <<<<<<< HEAD
740750 #[ requires(
741751 count. checked_mul( core:: mem:: size_of:: < T > ( ) ) . is_some( ) &&
742752 count * core:: mem:: size_of:: < T > ( ) <= isize:: MAX as usize & &
743753 core:: ub_checks:: same_allocation( self . as_ptr( ) , self . as_ptr( ) . wrapping_sub( count) )
744754 ) ]
745755 #[ ensures( |result: & NonNull <T >| result. as_ptr( ) == self . as_ptr( ) . offset( -( count as isize ) ) ) ]
756+ =======
757+ >>>>>>> 16 d4ed08dbd3f6db3007def332f925f9ca7e6b78
746758 pub const unsafe fn sub ( self , count : usize ) -> Self
747759 where
748760 T : Sized ,
@@ -1312,9 +1324,12 @@ impl<T: ?Sized> NonNull<T> {
13121324 #[ inline( always) ]
13131325 #[ stable( feature = "non_null_convenience" , since = "1.80.0" ) ]
13141326 #[ rustc_const_stable( feature = "const_swap" , since = "1.85.0" ) ]
1327+ <<<<<<< HEAD
13151328 #[ cfg_attr ( kani , kani:: modifies ( self . as_ptr ( ) , with. as_ptr ( ) ) ) ]
13161329 #[ requires ( ub_checks:: can_dereference ( self . as_ptr ( ) ) && ub_checks:: can_write ( self . as_ptr ( ) ) ) ]
13171330 #[ requires ( ub_checks:: can_dereference ( with. as_ptr ( ) ) && ub_checks:: can_write ( with. as_ptr ( ) ) ) ]
1331+ =======
1332+ >>>>>>> 16 d4ed08dbd3f6db3007def332f925f9ca7e6b78
13181333 pub const unsafe fn swap ( self , with : NonNull < T > )
13191334 where
13201335 T : Sized ,
0 commit comments