about summary refs log tree commit diff
path: root/src/libpanic_unwind
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-08-21 22:05:30 +0800
committerkennytm <kennytm@gmail.com>2018-08-21 22:05:30 +0800
commit0dd88c97975b2a2e4ea3e4a2bdc3670a9f40bd67 (patch)
tree0ad62b121fcafe2d11ee95819caf64e975d4ad00 /src/libpanic_unwind
parent9bbab65ebefbeb512445a759603b03f858e5e9b9 (diff)
parent993fb934640b7e514f3c629c33a2698a83ed8c3e (diff)
Rollup merge of #53329 - frewsxcv:frewsxcv-ptr-add-sub, r=RalfJung
Replace usages of ptr::offset with ptr::{add,sub}.

Rust provides these helper methods – so let's use them!
Diffstat (limited to 'src/libpanic_unwind')
-rw-r--r--src/libpanic_unwind/dwarf/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libpanic_unwind/dwarf/mod.rs b/src/libpanic_unwind/dwarf/mod.rs
index 5c05ac11d30..7e0c32fe03d 100644
--- a/src/libpanic_unwind/dwarf/mod.rs
+++ b/src/libpanic_unwind/dwarf/mod.rs
@@ -38,7 +38,7 @@ impl DwarfReader {
     // telling the backend to generate "misalignment-safe" code.
     pub unsafe fn read<T: Copy>(&mut self) -> T {
         let Unaligned(result) = *(self.ptr as *const Unaligned<T>);
-        self.ptr = self.ptr.offset(mem::size_of::<T>() as isize);
+        self.ptr = self.ptr.add(mem::size_of::<T>());
         result
     }