Skip to content

Commit 53f0eae

Browse files
committed
Revert "Use fewer instructions for fail!"
This reverts commit c61f976. Conflicts: src/librustrt/unwind.rs src/libstd/macros.rs
1 parent cf7a89f commit 53f0eae

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

src/librustrt/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern crate collections;
3333
#[cfg(test)] #[phase(plugin, link)] extern crate std;
3434

3535
pub use self::util::{Stdio, Stdout, Stderr};
36-
pub use self::unwind::{begin_unwind, begin_unwind_fmt, begin_unwind_no_time_to_explain};
36+
pub use self::unwind::{begin_unwind, begin_unwind_fmt};
3737

3838
use core::prelude::*;
3939

src/librustrt/unwind.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,6 @@ pub fn begin_unwind<M: Any + Send>(msg: M, file: &'static str, line: uint) -> !
432432
begin_unwind_inner(box msg, &(file, line))
433433
}
434434

435-
/// Unwinding for `fail!()`. Saves passing a string.
436-
#[inline(never)] #[cold] #[experimental]
437-
pub fn begin_unwind_no_time_to_explain(file_line: &(&'static str, uint)) -> ! {
438-
begin_unwind_inner(box () ("explicit failure"), file_line)
439-
}
440-
441435
/// The core of the unwinding.
442436
///
443437
/// This is non-generic to avoid instantiation bloat in other crates

src/libstd/macros.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@
3939
#[macro_export]
4040
macro_rules! fail(
4141
() => ({
42-
// static requires less code at runtime, more constant data
43-
static FILE_LINE: (&'static str, uint) = (file!(), line!());
44-
::std::rt::begin_unwind_no_time_to_explain(&FILE_LINE)
42+
fail!("explicit failure")
4543
});
4644
($msg:expr) => ({
45+
// static requires less code at runtime, more constant data
4746
static FILE_LINE: (&'static str, uint) = (file!(), line!());
4847
let (file, line) = FILE_LINE;
4948
::std::rt::begin_unwind($msg, file, line)

src/libstd/rt/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ pub use self::util::{default_sched_threads, min_stack, running_on_valgrind};
6666
// standard library which work together to create the entire runtime.
6767
pub use alloc::{heap, libc_heap};
6868
pub use rustrt::{task, local, mutex, exclusive, stack, args, rtio, thread};
69-
pub use rustrt::{Stdio, Stdout, Stderr};
70-
pub use rustrt::{begin_unwind, begin_unwind_fmt, begin_unwind_no_time_to_explain};
69+
pub use rustrt::{Stdio, Stdout, Stderr, begin_unwind, begin_unwind_fmt};
7170
pub use rustrt::{bookkeeping, at_exit, unwind, DEFAULT_ERROR_CODE, Runtime};
7271

7372
// Simple backtrace functionality (to print on failure)

0 commit comments

Comments
 (0)