diff options
| author | bors <bors@rust-lang.org> | 2014-08-08 12:51:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-08-08 12:51:13 +0000 |
| commit | 67a05bd793328d33c7fd7b01e0e4d656e1bbe450 (patch) | |
| tree | 7c07a84a5704fe4752bfa5a2cce1743677b64051 /src/libstd | |
| parent | 3b1f983584218fb9c2d1274e0361bca89c25e8a9 (diff) | |
| parent | 4fd797e7576992c199914faced30ef8e2f0b3b91 (diff) | |
| download | rust-67a05bd793328d33c7fd7b01e0e4d656e1bbe450.tar.gz rust-67a05bd793328d33c7fd7b01e0e4d656e1bbe450.zip | |
auto merge of #16349 : nikomatsakis/rust/snapshot-20140808, r=nikomatsakis
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/tempfile.rs | 3 | ||||
| -rw-r--r-- | src/libstd/macros.rs | 34 |
2 files changed, 0 insertions, 37 deletions
diff --git a/src/libstd/io/tempfile.rs b/src/libstd/io/tempfile.rs index 1d53ed81437..2faa23a6aa0 100644 --- a/src/libstd/io/tempfile.rs +++ b/src/libstd/io/tempfile.rs @@ -21,9 +21,6 @@ use path::{Path, GenericPath}; use result::{Ok, Err}; use sync::atomic; -#[cfg(stage0)] -use iter::Iterator; // NOTE(stage0): Remove after snapshot. - /// A wrapper for a path to temporary directory implementing automatic /// scope-based deletion. pub struct TempDir { diff --git a/src/libstd/macros.rs b/src/libstd/macros.rs index 3184c151bd2..f2d7fb0cea6 100644 --- a/src/libstd/macros.rs +++ b/src/libstd/macros.rs @@ -37,7 +37,6 @@ /// fail!("this is a {} {message}", "fancy", message = "message"); /// ``` #[macro_export] -#[cfg(not(stage0))] macro_rules! fail( () => ({ fail!("explicit failure") @@ -68,39 +67,6 @@ macro_rules! fail( }); ) -#[macro_export] -#[cfg(stage0)] -macro_rules! fail( - () => ({ - fail!("explicit failure") - }); - ($msg:expr) => ({ - // static requires less code at runtime, more constant data - static FILE_LINE: (&'static str, uint) = (file!(), line!()); - let (file, line) = FILE_LINE; - ::std::rt::begin_unwind($msg, file, line) - }); - ($fmt:expr, $($arg:tt)*) => ({ - // a closure can't have return type !, so we need a full - // function to pass to format_args!, *and* we need the - // file and line numbers right here; so an inner bare fn - // is our only choice. - // - // LLVM doesn't tend to inline this, presumably because begin_unwind_fmt - // is #[cold] and #[inline(never)] and because this is flagged as cold - // as returning !. We really do want this to be inlined, however, - // because it's just a tiny wrapper. Small wins (156K to 149K in size) - // were seen when forcing this to be inlined, and that number just goes - // up with the number of calls to fail!() - #[inline(always)] - fn run_fmt(fmt: &::std::fmt::Arguments) -> ! { - static FILE_LINE: (&'static str, uint) = (file!(), line!()); - ::std::rt::begin_unwind_fmt(fmt, &FILE_LINE) - } - format_args!(run_fmt, $fmt, $($arg)*) - }); -) - /// Ensure that a boolean expression is `true` at runtime. /// /// This will invoke the `fail!` macro if the provided expression cannot be |
