about summary refs log tree commit diff
path: root/src/libstd/sys/unix/backtrace.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-08-12 17:07:11 +0000
committerbors <bors@rust-lang.org>2015-08-12 17:07:11 +0000
commit8b5948d5bf08f27bf443356549a25b39d40c159d (patch)
treef3d54534ff69927186d3b2a6e892544899b77716 /src/libstd/sys/unix/backtrace.rs
parent81c9ff24fe6d53eb51d9427302ec842da49b9edc (diff)
parent6b09eb8e17d1952a930e1411da85703c2c534dde (diff)
downloadrust-8b5948d5bf08f27bf443356549a25b39d40c159d.tar.gz
rust-8b5948d5bf08f27bf443356549a25b39d40c159d.zip
Auto merge of #27688 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/sys/unix/backtrace.rs')
-rw-r--r--src/libstd/sys/unix/backtrace.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/sys/unix/backtrace.rs b/src/libstd/sys/unix/backtrace.rs
index 4128431ee64..853e745b8a1 100644
--- a/src/libstd/sys/unix/backtrace.rs
+++ b/src/libstd/sys/unix/backtrace.rs
@@ -83,8 +83,6 @@
 /// to symbols. This is a bit of a hokey implementation as-is, but it works for
 /// all unix platforms we support right now, so it at least gets the job done.
 
-#[cfg(stage0)]
-use prelude::v1::*;
 use io::prelude::*;
 
 use ffi::CStr;
@@ -107,6 +105,8 @@ use sys_common::backtrace::*;
 #[cfg(all(target_os = "ios", target_arch = "arm"))]
 #[inline(never)]
 pub fn write(w: &mut Write) -> io::Result<()> {
+    use mem;
+
     extern {
         fn backtrace(buf: *mut *mut libc::c_void,
                      sz: libc::c_int) -> libc::c_int;
@@ -121,7 +121,7 @@ pub fn write(w: &mut Write) -> io::Result<()> {
     try!(writeln!(w, "stack backtrace:"));
     // 100 lines should be enough
     const SIZE: usize = 100;
-    let mut buf: [*mut libc::c_void; SIZE] = unsafe {mem::zeroed()};
+    let mut buf: [*mut libc::c_void; SIZE] = unsafe { mem::zeroed() };
     let cnt = unsafe { backtrace(buf.as_mut_ptr(), SIZE as libc::c_int) as usize};
 
     // skipping the first one as it is write itself