about summary refs log tree commit diff
path: root/src/libpanic_unwind
diff options
context:
space:
mode:
authorTobias Bucher <tobiasbucher5991@gmail.com>2016-06-24 20:54:52 +0200
committerTobias Bucher <tobiasbucher5991@gmail.com>2016-07-12 10:40:40 +0200
commit81e95c18b7d4c45c7ef41b231af4ecd40543567d (patch)
treeced85ac151c5d6c0a892fc063906a232b3b49ea3 /src/libpanic_unwind
parent2539c15b49530e882a3e8803b3f53a7914d367be (diff)
Use `ptr::{null, null_mut}` instead of `0 as *{const, mut}`
Diffstat (limited to 'src/libpanic_unwind')
-rw-r--r--src/libpanic_unwind/gcc.rs3
-rw-r--r--src/libpanic_unwind/seh64_gnu.rs3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libpanic_unwind/gcc.rs b/src/libpanic_unwind/gcc.rs
index 8df68da3786..3c46072e17e 100644
--- a/src/libpanic_unwind/gcc.rs
+++ b/src/libpanic_unwind/gcc.rs
@@ -57,6 +57,7 @@
 #![allow(private_no_mangle_fns)]
 
 use core::any::Any;
+use core::ptr;
 use alloc::boxed::Box;
 
 use unwind as uw;
@@ -88,7 +89,7 @@ pub unsafe fn panic(data: Box<Any + Send>) -> u32 {
 }
 
 pub fn payload() -> *mut u8 {
-    0 as *mut u8
+    ptr::null_mut()
 }
 
 pub unsafe fn cleanup(ptr: *mut u8) -> Box<Any + Send> {
diff --git a/src/libpanic_unwind/seh64_gnu.rs b/src/libpanic_unwind/seh64_gnu.rs
index 12e1a764c5f..56801e8cb6b 100644
--- a/src/libpanic_unwind/seh64_gnu.rs
+++ b/src/libpanic_unwind/seh64_gnu.rs
@@ -18,6 +18,7 @@ use alloc::boxed::Box;
 
 use core::any::Any;
 use core::intrinsics;
+use core::ptr;
 use dwarf::eh;
 use windows as c;
 
@@ -50,7 +51,7 @@ pub unsafe fn panic(data: Box<Any + Send>) -> u32 {
 }
 
 pub fn payload() -> *mut u8 {
-    0 as *mut u8
+    ptr::null_mut()
 }
 
 pub unsafe fn cleanup(ptr: *mut u8) -> Box<Any + Send> {