use fmt;
use intrinsics;
- // NOTE: remove after next snapshot
- #[cfg(stage0)]
- pub use self::fail_ as fail;
-
- // NOTE: remove after next snapshot
- #[cfg(stage0)]
- #[cold] #[inline(never)] // this is the slow path, always
- #[lang="fail_"]
- fn fail_(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
- let (expr, file, line) = *expr_file_line;
- let ref file_line = (file, line);
- format_args!(|args| -> () {
- fail_fmt(args, file_line);
- }, "{}", expr);
-
- unsafe { intrinsics::abort() }
- }
-
- #[cfg(not(stage0))]
#[cold] #[inline(never)] // this is the slow path, always
#[lang="fail"]
-fn fail(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
+pub fn fail(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
let (expr, file, line) = *expr_file_line;
let ref file_line = (file, line);
format_args!(|args| -> () {