File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ impl<T: ?Sized> *const T {
260
260
//
261
261
// As a result, we use the following implementation, which would be
262
262
// wrong on CHERI, but right everywhere else.
263
- self . cast :: < u8 > ( ) . wrapping_sub ( self_addr ) . wrapping_add ( addr ) . cast :: < T > ( )
263
+ self . cast :: < u8 > ( ) . wrapping_add ( addr ) . wrapping_sub ( self_addr ) . cast :: < T > ( )
264
264
}
265
265
266
266
/// Creates a new pointer by mapping `self`'s address to a new one.
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ impl<T: ?Sized> *mut T {
264
264
//
265
265
// As a result, we use the following implementation, which would be
266
266
// wrong on CHERI, but right everywhere else.
267
- self . cast :: < u8 > ( ) . wrapping_sub ( self_addr ) . wrapping_add ( addr ) . cast :: < T > ( )
267
+ self . cast :: < u8 > ( ) . wrapping_add ( addr ) . wrapping_sub ( self_addr ) . cast :: < T > ( )
268
268
}
269
269
270
270
/// Creates a new pointer by mapping `self`'s address to a new one.
You can’t perform that action at this time.
0 commit comments