Skip to content

Commit 00ac2c0

Browse files
committed
rollup merge of rust-lang#27674: zaeleus/ios-imports
See rust-lang#27590 (comment).
2 parents d4f2ef9 + 8f4aee8 commit 00ac2c0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/libstd/rand/os.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,12 @@ mod imp {
182182

183183
#[cfg(target_os = "ios")]
184184
mod imp {
185-
use prelude::v1::*;
185+
#[cfg(stage0)] use prelude::v1::*;
186186

187187
use io;
188188
use mem;
189189
use rand::Rng;
190-
use libc::{c_int, c_void, size_t};
190+
use libc::{c_int, size_t};
191191

192192
/// A random number generator that retrieves randomness straight from
193193
/// the operating system. Platform sources:

src/libstd/sys/unix/backtrace.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ use sys_common::backtrace::*;
107107
#[cfg(all(target_os = "ios", target_arch = "arm"))]
108108
#[inline(never)]
109109
pub fn write(w: &mut Write) -> io::Result<()> {
110+
use mem;
111+
110112
extern {
111113
fn backtrace(buf: *mut *mut libc::c_void,
112114
sz: libc::c_int) -> libc::c_int;
@@ -121,7 +123,7 @@ pub fn write(w: &mut Write) -> io::Result<()> {
121123
try!(writeln!(w, "stack backtrace:"));
122124
// 100 lines should be enough
123125
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() };
125127
let cnt = unsafe { backtrace(buf.as_mut_ptr(), SIZE as libc::c_int) as usize};
126128

127129
// skipping the first one as it is write itself

0 commit comments

Comments
 (0)