#[cfg(test)] #[phase(plugin, link)] extern crate std;
pub use self::util::{Stdio, Stdout, Stderr};
-pub use self::unwind::{begin_unwind, begin_unwind_fmt, begin_unwind_no_time_to_explain};
+pub use self::unwind::{begin_unwind, begin_unwind_fmt};
use core::prelude::*;
begin_unwind_inner(box msg, &(file, line))
}
-/// Unwinding for `fail!()`. Saves passing a string.
-#[inline(never)] #[cold] #[experimental]
-pub fn begin_unwind_no_time_to_explain(file_line: &(&'static str, uint)) -> ! {
- begin_unwind_inner(box () ("explicit failure"), file_line)
-}
-
/// The core of the unwinding.
///
/// This is non-generic to avoid instantiation bloat in other crates
#[macro_export]
macro_rules! fail(
() => ({
- // static requires less code at runtime, more constant data
- static FILE_LINE: (&'static str, uint) = (file!(), line!());
- ::std::rt::begin_unwind_no_time_to_explain(&FILE_LINE)
+ 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)
// standard library which work together to create the entire runtime.
pub use alloc::{heap, libc_heap};
pub use rustrt::{task, local, mutex, exclusive, stack, args, rtio, thread};
-pub use rustrt::{Stdio, Stdout, Stderr};
-pub use rustrt::{begin_unwind, begin_unwind_fmt, begin_unwind_no_time_to_explain};
+pub use rustrt::{Stdio, Stdout, Stderr, begin_unwind, begin_unwind_fmt};
pub use rustrt::{bookkeeping, at_exit, unwind, DEFAULT_ERROR_CODE, Runtime};
// Simple backtrace functionality (to print on failure)