]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/backtrace.rs
Use a single ReentrantMutex implementation on all platforms.
[rust.git] / library / std / src / backtrace.rs
index 3b0922ad16f2566480f802c055876d0050af2698..05e9b2eb6bc3cb64b513a7d0a1b454ce4d475f5d 100644 (file)
@@ -293,7 +293,7 @@ pub fn capture() -> Backtrace {
         if !Backtrace::enabled() {
             return Backtrace { inner: Inner::Disabled };
         }
-        Backtrace::create((Backtrace::capture as *mut ()).addr())
+        Backtrace::create(Backtrace::capture as usize)
     }
 
     /// Forcibly captures a full backtrace, regardless of environment variable
@@ -308,7 +308,7 @@ pub fn capture() -> Backtrace {
     /// parts of code.
     #[inline(never)] // want to make sure there's a frame here to remove
     pub fn force_capture() -> Backtrace {
-        Backtrace::create((Backtrace::force_capture as *mut ()).addr())
+        Backtrace::create(Backtrace::force_capture as usize)
     }
 
     /// Forcibly captures a disabled backtrace, regardless of environment