diff options
| author | bors <bors@rust-lang.org> | 2014-12-23 02:41:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-12-23 02:41:48 +0000 |
| commit | 62fb41c32bd97c4e9bc286a1db5d7126a06b8b91 (patch) | |
| tree | fc1c7ab2bf1a29879d45235acaf0126ceae4d107 /src/libstd/rt | |
| parent | 2f3cff6956d56048ef7afb6d33e17cbdb2dcf038 (diff) | |
| parent | 3583d613b9c81855feb067aeeebb525cf8a4184c (diff) | |
| download | rust-62fb41c32bd97c4e9bc286a1db5d7126a06b8b91.tar.gz rust-62fb41c32bd97c4e9bc286a1db5d7126a06b8b91.zip | |
auto merge of #20145 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/backtrace.rs | 3 | ||||
| -rw-r--r-- | src/libstd/rt/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/unwind.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/util.rs | 23 |
4 files changed, 15 insertions, 15 deletions
diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs index 4a692bccf9e..775e9bb526f 100644 --- a/src/libstd/rt/backtrace.rs +++ b/src/libstd/rt/backtrace.rs @@ -12,7 +12,8 @@ #![allow(non_camel_case_types)] -use option::Option::{Some, None}; +use prelude::*; + use os; use sync::atomic; diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 8d9c1268e7e..d64336569c6 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -91,7 +91,7 @@ fn lang_start(main: *const u8, argc: int, argv: *const *const u8) -> int { // created. Note that this isn't necessary in general for new threads, // but we just do this to name the main thread and to give it correct // info about the stack bounds. - let thread: Thread = NewThread::new(Some("<main>".into_string())); + let thread: Thread = NewThread::new(Some("<main>".to_string())); thread_info::set((my_stack_bottom, my_stack_top), sys::thread::guard::main(), thread); diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs index f572141642c..eb15a7ba378 100644 --- a/src/libstd/rt/unwind.rs +++ b/src/libstd/rt/unwind.rs @@ -512,7 +512,7 @@ pub fn begin_unwind_fmt(msg: &fmt::Arguments, file_line: &(&'static str, uint)) let mut v = Vec::new(); let _ = write!(&mut VecWriter { v: &mut v }, "{}", msg); - let msg = box String::from_utf8_lossy(v.as_slice()).into_string(); + let msg = box String::from_utf8_lossy(v.as_slice()).into_owned(); begin_unwind_inner(msg, file_line) } diff --git a/src/libstd/rt/util.rs b/src/libstd/rt/util.rs index 77500ca74d0..d8cd8455deb 100644 --- a/src/libstd/rt/util.rs +++ b/src/libstd/rt/util.rs @@ -10,16 +10,16 @@ // // ignore-lexer-test FIXME #15677 -use core::prelude::*; +use prelude::*; -use core::cmp; -use core::fmt; -use core::intrinsics; -use core::slice; -use core::str; - -use libc::{mod, uintptr_t}; +use cmp; +use fmt; +use intrinsics; +use libc::uintptr_t; +use libc; use os; +use slice; +use str; use sync::atomic; /// Dynamically inquire about whether we're running under V. @@ -52,7 +52,7 @@ pub fn min_stack() -> uint { 0 => {} n => return n - 1, } - let amt = os::getenv("RUST_MIN_STACK").and_then(|s| from_str(s.as_slice())); + let amt = os::getenv("RUST_MIN_STACK").and_then(|s| s.parse()); let amt = amt.unwrap_or(2 * 1024 * 1024); // 0 is our sentinel value, so ensure that we'll never see 0 after // initialization has run @@ -65,7 +65,7 @@ pub fn min_stack() -> uint { pub fn default_sched_threads() -> uint { match os::getenv("RUST_THREADS") { Some(nstr) => { - let opt_n: Option<uint> = from_str(nstr.as_slice()); + let opt_n: Option<uint> = nstr.parse(); match opt_n { Some(n) if n > 0 => n, _ => panic!("`RUST_THREADS` is `{}`, should be a positive integer", nstr) @@ -113,9 +113,8 @@ impl fmt::FormatWriter for Stdio { } pub fn dumb_print(args: &fmt::Arguments) { - use fmt::FormatWriter; let mut w = Stderr; - let _ = w.write_fmt(args); + let _ = write!(&mut w, "{}", args); } pub fn abort(args: &fmt::Arguments) -> ! { |
