about summary refs log tree commit diff
path: root/src/liballoc_system
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2018-08-19 22:16:22 -0400
committerCorey Farwell <coreyf@rwell.org>2018-08-20 07:28:34 -0400
commit993fb934640b7e514f3c629c33a2698a83ed8c3e (patch)
tree98cb19e128d3d8a5c32b620bebc16fae8b3877b7 /src/liballoc_system
parent6bf6d50a6ff7685b4aa09172d9d09f03f250da9d (diff)
downloadrust-993fb934640b7e514f3c629c33a2698a83ed8c3e.tar.gz
rust-993fb934640b7e514f3c629c33a2698a83ed8c3e.zip
Replace usages of ptr::offset with ptr::{add,sub}.
Diffstat (limited to 'src/liballoc_system')
-rw-r--r--src/liballoc_system/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs
index c5e056f6b12..753b6a5e292 100644
--- a/src/liballoc_system/lib.rs
+++ b/src/liballoc_system/lib.rs
@@ -249,7 +249,7 @@ mod platform {
     }
 
     unsafe fn align_ptr(ptr: *mut u8, align: usize) -> *mut u8 {
-        let aligned = ptr.offset((align - (ptr as usize & (align - 1))) as isize);
+        let aligned = ptr.add(align - (ptr as usize & (align - 1)));
         *get_header(aligned) = Header(ptr);
         aligned
     }