File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -182,12 +182,12 @@ mod imp {
182
182
183
183
#[ cfg( target_os = "ios" ) ]
184
184
mod imp {
185
- use prelude:: v1:: * ;
185
+ # [ cfg ( stage0 ) ] use prelude:: v1:: * ;
186
186
187
187
use io;
188
188
use mem;
189
189
use rand:: Rng ;
190
- use libc:: { c_int, c_void , size_t} ;
190
+ use libc:: { c_int, size_t} ;
191
191
192
192
/// A random number generator that retrieves randomness straight from
193
193
/// the operating system. Platform sources:
Original file line number Diff line number Diff line change @@ -107,6 +107,8 @@ use sys_common::backtrace::*;
107
107
#[ cfg( all( target_os = "ios" , target_arch = "arm" ) ) ]
108
108
#[ inline( never) ]
109
109
pub fn write ( w : & mut Write ) -> io:: Result < ( ) > {
110
+ use mem;
111
+
110
112
extern {
111
113
fn backtrace ( buf : * mut * mut libc:: c_void ,
112
114
sz : libc:: c_int ) -> libc:: c_int ;
@@ -121,7 +123,7 @@ pub fn write(w: &mut Write) -> io::Result<()> {
121
123
try!( writeln ! ( w, "stack backtrace:" ) ) ;
122
124
// 100 lines should be enough
123
125
const SIZE : usize = 100 ;
124
- let mut buf: [ * mut libc:: c_void ; SIZE ] = unsafe { mem:: zeroed ( ) } ;
126
+ let mut buf: [ * mut libc:: c_void ; SIZE ] = unsafe { mem:: zeroed ( ) } ;
125
127
let cnt = unsafe { backtrace ( buf. as_mut_ptr ( ) , SIZE as libc:: c_int ) as usize } ;
126
128
127
129
// skipping the first one as it is write itself
You can’t perform that action at this time.
0 commit comments